openproject-primer_view_components 0.91.1 → 0.91.3
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 +22 -0
- data/app/assets/javascripts/primer_view_components.js +1 -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/layout.css +1 -1
- data/app/components/primer/alpha/layout.css.json +2 -0
- data/app/components/primer/alpha/layout.css.map +1 -1
- data/app/components/primer/alpha/layout.pcss +20 -0
- data/app/components/primer/alpha/layout.rb +3 -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/toggle_switch.pcss +6 -0
- data/app/components/primer/alpha/tree_view/sub_tree.html.erb +2 -2
- data/app/components/primer/alpha/tree_view/sub_tree.rb +6 -0
- data/app/components/primer/alpha/tree_view/tree_view.d.ts +1 -1
- data/app/components/primer/alpha/tree_view/tree_view.js +13 -3
- data/app/components/primer/alpha/tree_view/tree_view.ts +17 -3
- data/app/components/primer/alpha/tree_view.css +1 -1
- data/app/components/primer/alpha/tree_view.css.map +1 -1
- data/app/components/primer/alpha/tree_view.pcss +1 -1
- data/app/components/primer/open_project/border_box/collapsible_header.d.ts +1 -2
- data/app/components/primer/open_project/border_box/collapsible_header.js +1 -0
- data/app/components/primer/open_project/border_box/collapsible_header.ts +1 -1
- data/app/components/primer/open_project/collapsible_section.d.ts +1 -2
- data/app/components/primer/open_project/collapsible_section.js +1 -0
- data/app/components/primer/open_project/collapsible_section.ts +1 -1
- data/app/components/primer/open_project/zen_mode_button.js +0 -1
- data/app/components/primer/open_project/zen_mode_button.ts +0 -1
- data/app/controllers/primer/view_components/tree_view_items_controller.rb +1 -1
- data/app/lib/primer/forms/text_field.html.erb +7 -3
- data/app/views/primer/view_components/tree_view_items/async_alpha.html_fragment.erb +1 -1
- data/config/locales/en.yml +3 -0
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/alpha/layout_preview.rb +16 -0
- data/previews/primer/alpha/tree_view_preview/async_alpha.html.erb +1 -1
- data/previews/primer/alpha/tree_view_preview.rb +3 -3
- data/static/classnames.cjs +2 -0
- data/static/classnames.js +2 -0
- data/static/constants.json +6 -2
- data/static/info_arch.json +27 -1
- data/static/previews.json +26 -0
- metadata +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.Layout{display:grid;--Layout-sidebar-width:220px;--Layout-gutter:16px}@media (max-width:calc(544px - 0.02px)){.Layout{grid-auto-flow:row;grid-template-columns:1fr!important}.Layout :is(.Layout-divider,.Layout-main,.Layout-sidebar){width:100%!important;grid-column:1!important}.Layout.Layout--sidebarPosition-flowRow-start .Layout-sidebar{grid-row:1}.Layout.Layout--sidebarPosition-flowRow-end .Layout-sidebar,.Layout.Layout--sidebarPosition-flowRow-start .Layout-main{grid-row:2/span 2}.Layout.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}.Layout.Layout--sidebarPosition-flowRow-none .Layout-sidebar{display:none}.Layout.Layout--divided{--Layout-gutter:0}.Layout.Layout--divided .Layout-divider{height:1px;grid-row:2}.Layout-divider--flowRow-hidden:is(.Layout.Layout--divided .Layout-divider){display:none}.Layout-divider--flowRow-shallow:is(.Layout.Layout--divided .Layout-divider){height:8px;margin-right:0;background:var(--bgColor-inset);border-color:var(--borderColor-default);border-style:solid;border-width:var(--borderWidth-thin) 0}.Layout.Layout--divided .Layout-main,.Layout.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-sidebar{grid-row:3/span 1}.Layout.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}}@media (max-width:calc(768px - 0.02px)){.Layout.Layout--flowRow-until-md{grid-auto-flow:row;grid-template-columns:1fr!important}.Layout.Layout--flowRow-until-md :is(.Layout-divider,.Layout-main,.Layout-sidebar){width:100%!important;grid-column:1!important}.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-start .Layout-sidebar{grid-row:1}.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-end .Layout-sidebar,.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-start .Layout-main{grid-row:2/span 2}.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-none .Layout-sidebar{display:none}.Layout.Layout--flowRow-until-md.Layout--divided{--Layout-gutter:0}.Layout.Layout--flowRow-until-md.Layout--divided .Layout-divider{height:1px;grid-row:2}.Layout-divider--flowRow-hidden:is(.Layout.Layout--flowRow-until-md.Layout--divided .Layout-divider){display:none}.Layout-divider--flowRow-shallow:is(.Layout.Layout--flowRow-until-md.Layout--divided .Layout-divider){height:8px;margin-right:0;background:var(--bgColor-inset);border-color:var(--borderColor-default);border-style:solid;border-width:var(--borderWidth-thin) 0}.Layout.Layout--flowRow-until-md.Layout--divided .Layout-main,.Layout.Layout--flowRow-until-md.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-sidebar{grid-row:3/span 1}.Layout.Layout--flowRow-until-md.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}}@media (max-width:calc(1012px - 0.02px)){.Layout.Layout--flowRow-until-lg{grid-auto-flow:row;grid-template-columns:1fr!important}.Layout.Layout--flowRow-until-lg :is(.Layout-divider,.Layout-main,.Layout-sidebar){width:100%!important;grid-column:1!important}.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-start .Layout-sidebar{grid-row:1}.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-end .Layout-sidebar,.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-start .Layout-main{grid-row:2/span 2}.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-none .Layout-sidebar{display:none}.Layout.Layout--flowRow-until-lg.Layout--divided{--Layout-gutter:0}.Layout.Layout--flowRow-until-lg.Layout--divided .Layout-divider{height:1px;grid-row:2}.Layout-divider--flowRow-hidden:is(.Layout.Layout--flowRow-until-lg.Layout--divided .Layout-divider){display:none}.Layout-divider--flowRow-shallow:is(.Layout.Layout--flowRow-until-lg.Layout--divided .Layout-divider){height:8px;margin-right:0;background:var(--bgColor-inset);border-color:var(--borderColor-default);border-style:solid;border-width:var(--borderWidth-thin) 0}.Layout.Layout--flowRow-until-lg.Layout--divided .Layout-main,.Layout.Layout--flowRow-until-lg.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-sidebar{grid-row:3/span 1}.Layout.Layout--flowRow-until-lg.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}}.Layout{grid-auto-flow:column;grid-template-columns:auto 0 minmax(0,calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter)));gap:var(--Layout-gutter)}.Layout .Layout-sidebar{grid-column:1}.Layout .Layout-divider{display:none}.Layout .Layout-main{grid-column:2/span 2}@media (min-width:1012px){.Layout{--Layout-gutter:24px}}.Layout.Layout--gutter-none{--Layout-gutter:0px}.Layout.Layout--gutter-condensed{--Layout-gutter:16px}@media (min-width:1012px){.Layout.Layout--gutter-spacious{--Layout-gutter:32px}}@media (min-width:1280px){.Layout.Layout--gutter-spacious{--Layout-gutter:40px}}@media (min-width:544px){.Layout{--Layout-sidebar-width:220px}}@media (min-width:768px){.Layout{--Layout-sidebar-width:256px}}@media (min-width:1012px){.Layout{--Layout-sidebar-width:296px}}@media (min-width:768px){.Layout.Layout--sidebar-narrow{--Layout-sidebar-width:240px}}@media (min-width:1012px){.Layout.Layout--sidebar-narrow{--Layout-sidebar-width:256px}.Layout.Layout--sidebar-wide{--Layout-sidebar-width:320px}}@media (min-width:1280px){.Layout.Layout--sidebar-wide{--Layout-sidebar-width:336px}}.Layout.Layout--sidebarPosition-start .Layout-sidebar{grid-column:1}.Layout.Layout--sidebarPosition-start .Layout-main{grid-column:2/span 2}.Layout.Layout--sidebarPosition-end{grid-template-columns:minmax(0,calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))) 0 auto}.Layout.Layout--sidebarPosition-end .Layout-main{grid-column:1}.Layout.Layout--sidebarPosition-end .Layout-sidebar{grid-column:2/span 2}.Layout.Layout--divided .Layout-divider{display:block;grid-column:2;width:1px;margin-right:-1px;background:var(--borderColor-default)}.Layout.Layout--divided .Layout-main,.Layout.Layout--divided.Layout--sidebarPosition-end .Layout-sidebar{grid-column:3/span 1}.Layout.Layout--divided.Layout--sidebarPosition-end .Layout-main{grid-column:1}.Layout-divider{display:none;width:1px}.Layout-sidebar{width:var(--Layout-sidebar-width)}.Layout-main{min-width:0}.Layout-main :is(.Layout-main-centered-lg,.Layout-main-centered-md,.Layout-main-centered-xl){margin-right:auto;margin-left:auto}:is(.Layout-main .Layout-main-centered-md,.Layout-main .Layout-main-centered-lg,.Layout-main .Layout-main-centered-xl)>:is(.container-lg,.container-md,.container-xl){margin-left:0}.Layout-main .Layout-main-centered-md{max-width:calc(var(--breakpoint-medium) + var(--Layout-sidebar-width) + var(--Layout-gutter))}.Layout-main .Layout-main-centered-lg{max-width:calc(var(--breakpoint-large) + var(--Layout-sidebar-width) + var(--Layout-gutter))}.Layout-main .Layout-main-centered-xl{max-width:calc(var(--breakpoint-xlarge) + var(--Layout-sidebar-width) + var(--Layout-gutter))}
|
|
1
|
+
.Layout{display:grid;--Layout-sidebar-width:220px;--Layout-gutter:16px}@media (max-width:calc(544px - 0.02px)){.Layout{grid-auto-flow:row;grid-template-columns:1fr!important}.Layout :is(.Layout-divider,.Layout-main,.Layout-sidebar){width:100%!important;grid-column:1!important}.Layout.Layout--sidebarPosition-flowRow-start .Layout-sidebar{grid-row:1}.Layout.Layout--sidebarPosition-flowRow-end .Layout-sidebar,.Layout.Layout--sidebarPosition-flowRow-start .Layout-main{grid-row:2/span 2}.Layout.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}.Layout.Layout--sidebarPosition-flowRow-none .Layout-sidebar{display:none}.Layout.Layout--divided{--Layout-gutter:0}.Layout.Layout--divided .Layout-divider{height:1px;grid-row:2}.Layout-divider--flowRow-hidden:is(.Layout.Layout--divided .Layout-divider){display:none}.Layout-divider--flowRow-shallow:is(.Layout.Layout--divided .Layout-divider){height:8px;margin-right:0;background:var(--bgColor-inset);border-color:var(--borderColor-default);border-style:solid;border-width:var(--borderWidth-thin) 0}.Layout.Layout--divided .Layout-main,.Layout.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-sidebar{grid-row:3/span 1}.Layout.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}}@media (max-width:calc(768px - 0.02px)){.Layout.Layout--flowRow-until-md{grid-auto-flow:row;grid-template-columns:1fr!important}.Layout.Layout--flowRow-until-md :is(.Layout-divider,.Layout-main,.Layout-sidebar){width:100%!important;grid-column:1!important}.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-start .Layout-sidebar{grid-row:1}.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-end .Layout-sidebar,.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-start .Layout-main{grid-row:2/span 2}.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}.Layout.Layout--flowRow-until-md.Layout--sidebarPosition-flowRow-none .Layout-sidebar{display:none}.Layout.Layout--flowRow-until-md.Layout--divided{--Layout-gutter:0}.Layout.Layout--flowRow-until-md.Layout--divided .Layout-divider{height:1px;grid-row:2}.Layout-divider--flowRow-hidden:is(.Layout.Layout--flowRow-until-md.Layout--divided .Layout-divider){display:none}.Layout-divider--flowRow-shallow:is(.Layout.Layout--flowRow-until-md.Layout--divided .Layout-divider){height:8px;margin-right:0;background:var(--bgColor-inset);border-color:var(--borderColor-default);border-style:solid;border-width:var(--borderWidth-thin) 0}.Layout.Layout--flowRow-until-md.Layout--divided .Layout-main,.Layout.Layout--flowRow-until-md.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-sidebar{grid-row:3/span 1}.Layout.Layout--flowRow-until-md.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}}@media (max-width:calc(1012px - 0.02px)){.Layout.Layout--flowRow-until-lg{grid-auto-flow:row;grid-template-columns:1fr!important}.Layout.Layout--flowRow-until-lg :is(.Layout-divider,.Layout-main,.Layout-sidebar){width:100%!important;grid-column:1!important}.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-start .Layout-sidebar{grid-row:1}.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-end .Layout-sidebar,.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-start .Layout-main{grid-row:2/span 2}.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}.Layout.Layout--flowRow-until-lg.Layout--sidebarPosition-flowRow-none .Layout-sidebar{display:none}.Layout.Layout--flowRow-until-lg.Layout--divided{--Layout-gutter:0}.Layout.Layout--flowRow-until-lg.Layout--divided .Layout-divider{height:1px;grid-row:2}.Layout-divider--flowRow-hidden:is(.Layout.Layout--flowRow-until-lg.Layout--divided .Layout-divider){display:none}.Layout-divider--flowRow-shallow:is(.Layout.Layout--flowRow-until-lg.Layout--divided .Layout-divider){height:8px;margin-right:0;background:var(--bgColor-inset);border-color:var(--borderColor-default);border-style:solid;border-width:var(--borderWidth-thin) 0}.Layout.Layout--flowRow-until-lg.Layout--divided .Layout-main,.Layout.Layout--flowRow-until-lg.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-sidebar{grid-row:3/span 1}.Layout.Layout--flowRow-until-lg.Layout--divided.Layout--sidebarPosition-flowRow-end .Layout-main{grid-row:1}}.Layout{grid-auto-flow:column;grid-template-columns:auto 0 minmax(0,calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter)));gap:var(--Layout-gutter)}.Layout .Layout-sidebar{grid-column:1}.Layout .Layout-divider{display:none}.Layout .Layout-main{grid-column:2/span 2}@media (min-width:1012px){.Layout{--Layout-gutter:24px}}.Layout.Layout--gutter-none{--Layout-gutter:0px}.Layout.Layout--gutter-condensed{--Layout-gutter:16px}@media (min-width:1012px){.Layout.Layout--gutter-spacious{--Layout-gutter:32px}}@media (min-width:1280px){.Layout.Layout--gutter-spacious{--Layout-gutter:40px}}@media (min-width:544px){.Layout{--Layout-sidebar-width:220px}}@media (min-width:768px){.Layout{--Layout-sidebar-width:256px}}@media (min-width:1012px){.Layout{--Layout-sidebar-width:296px}}@media (min-width:768px){.Layout.Layout--sidebar-narrow{--Layout-sidebar-width:240px}}@media (min-width:1012px){.Layout.Layout--sidebar-narrow{--Layout-sidebar-width:256px}.Layout.Layout--sidebar-wide{--Layout-sidebar-width:320px}}@media (min-width:1280px){.Layout.Layout--sidebar-wide{--Layout-sidebar-width:336px}}@media (min-width:1012px){.Layout.Layout--sidebar-xwide{--Layout-sidebar-width:408px}}@media (min-width:1280px){.Layout.Layout--sidebar-xwide{--Layout-sidebar-width:440px}}@media (min-width:1012px){.Layout.Layout--sidebar-xxwide{--Layout-sidebar-width:512px}}@media (min-width:1280px){.Layout.Layout--sidebar-xxwide{--Layout-sidebar-width:544px}}.Layout.Layout--sidebarPosition-start .Layout-sidebar{grid-column:1}.Layout.Layout--sidebarPosition-start .Layout-main{grid-column:2/span 2}.Layout.Layout--sidebarPosition-end{grid-template-columns:minmax(0,calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))) 0 auto}.Layout.Layout--sidebarPosition-end .Layout-main{grid-column:1}.Layout.Layout--sidebarPosition-end .Layout-sidebar{grid-column:2/span 2}.Layout.Layout--divided .Layout-divider{display:block;grid-column:2;width:1px;margin-right:-1px;background:var(--borderColor-default)}.Layout.Layout--divided .Layout-main,.Layout.Layout--divided.Layout--sidebarPosition-end .Layout-sidebar{grid-column:3/span 1}.Layout.Layout--divided.Layout--sidebarPosition-end .Layout-main{grid-column:1}.Layout-divider{display:none;width:1px}.Layout-sidebar{width:var(--Layout-sidebar-width)}.Layout-main{min-width:0}.Layout-main :is(.Layout-main-centered-lg,.Layout-main-centered-md,.Layout-main-centered-xl){margin-right:auto;margin-left:auto}:is(.Layout-main .Layout-main-centered-md,.Layout-main .Layout-main-centered-lg,.Layout-main .Layout-main-centered-xl)>:is(.container-lg,.container-md,.container-xl){margin-left:0}.Layout-main .Layout-main-centered-md{max-width:calc(var(--breakpoint-medium) + var(--Layout-sidebar-width) + var(--Layout-gutter))}.Layout-main .Layout-main-centered-lg{max-width:calc(var(--breakpoint-large) + var(--Layout-sidebar-width) + var(--Layout-gutter))}.Layout-main .Layout-main-centered-xl{max-width:calc(var(--breakpoint-xlarge) + var(--Layout-sidebar-width) + var(--Layout-gutter))}
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
".Layout.Layout--gutter-spacious",
|
|
52
52
|
".Layout.Layout--sidebar-narrow",
|
|
53
53
|
".Layout.Layout--sidebar-wide",
|
|
54
|
+
".Layout.Layout--sidebar-xwide",
|
|
55
|
+
".Layout.Layout--sidebar-xxwide",
|
|
54
56
|
".Layout.Layout--sidebarPosition-start .Layout-sidebar",
|
|
55
57
|
".Layout.Layout--sidebarPosition-start .Layout-main",
|
|
56
58
|
".Layout.Layout--sidebarPosition-end",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["layout.pcss"],"names":[],"mappings":"AAkFA,QACE,YAAa,CAEb,4BAA6B,CAC7B,
|
|
1
|
+
{"version":3,"sources":["layout.pcss"],"names":[],"mappings":"AAkFA,QACE,YAAa,CAEb,4BAA6B,CAC7B,oBAoKF,CAlKE,wCANF,QA7EE,kBAAmB,CACnB,mCAoPF,CAlPE,0DAGE,oBAAsB,CACtB,uBACF,CAGE,8DACE,UACF,CAQA,uHACE,iBACF,CAEA,yDACE,UACF,CAIA,6DACE,YACF,CAGF,wBAoBA,iBAJA,CAMA,wCACE,UAAW,CACX,UAcF,CAZE,4EACE,YACF,CAEA,6EACE,UAAW,CACX,cAAe,CACf,+BAAgC,CAChC,uCAAwC,CACxC,kBAAmB,CACnB,sCACF,CA7BE,iHACE,iBACF,CAEA,yEACE,UACF,CAmCJ,CAGE,wCADF,iCAvFA,kBAAmB,CACnB,mCA0FA,CAxFA,mFAGE,oBAAsB,CACtB,uBACF,CAGE,uFACE,UACF,CAQA,yKACE,iBACF,CAEA,kFACE,UACF,CAIA,sFACE,YACF,CAGF,iDAoBA,iBAJA,CAMA,iEACE,UAAW,CACX,UAcF,CAZE,qGACE,YACF,CAEA,sGACE,UAAW,CACX,cAAe,CACf,+BAAgC,CAChC,uCAAwC,CACxC,kBAAmB,CACnB,sCACF,CA7BE,mKACE,iBACF,CAEA,kGACE,UACF,CAwCF,CAIA,yCADF,iCA7FA,kBAAmB,CACnB,mCAgGA,CA9FA,mFAGE,oBAAsB,CACtB,uBACF,CAGE,uFACE,UACF,CAQA,yKACE,iBACF,CAEA,kFACE,UACF,CAIA,sFACE,YACF,CAGF,iDAoBA,iBAJA,CAMA,iEACE,UAAW,CACX,UAcF,CAZE,qGACE,YACF,CAEA,sGACE,UAAW,CACX,cAAe,CACf,+BAAgC,CAChC,uCAAwC,CACxC,kBAAmB,CACnB,sCACF,CA7BE,mKACE,iBACF,CAEA,kGACE,UACF,CA8CF,CAnBJ,QAwBE,qBAAsB,CACtB,sGAAwG,CACxG,wBA8IF,CA5IE,wBACE,aACF,CAEA,wBACE,YACF,CAEA,qBACE,oBACF,CAIA,0BA1CF,QA2CI,oBA6HJ,CA5HE,CAEA,4BACE,mBACF,CAEA,iCACE,oBACF,CAGE,0BADF,gCAEI,oBAMJ,CALE,CAEA,0BALF,gCAMI,oBAEJ,CADE,CAIF,yBAjEF,QAkEI,4BAsGJ,CArGE,CAEA,yBArEF,QAsEI,4BAkGJ,CAjGE,CAEA,0BAzEF,QA0EI,4BA8FJ,CA7FE,CAGE,yBADF,+BAEI,4BAMJ,CALE,CAEA,0BALF,+BAMI,4BAEJ,CAEA,6BAEI,4BAMJ,CAXE,CAQA,0BALF,6BAMI,4BAEJ,CADE,CAIA,0BADF,8BAEI,4BAMJ,CALE,CAEA,0BALF,8BAMI,4BAEJ,CADE,CAIA,0BADF,+BAEI,4BAMJ,CALE,CAEA,0BALF,+BAMI,4BAEJ,CADE,CAMA,sDACE,aACF,CAEA,mDACE,oBACF,CAGF,oCACE,sGASF,CAPE,iDACE,aACF,CAEA,oDACE,oBACF,CAMA,wCACE,aAAc,CACd,aAAc,CACd,SAAU,CAEV,iBAAkB,CAElB,qCACF,CAOE,yGACE,oBACF,CAEA,iEACE,aACF,CAKN,gBACE,YAAa,CACb,SACF,CAEA,gBACE,iCACF,CAEA,aACE,WA4BF,CAxBE,6FAGE,iBAAkB,CAClB,gBAOF,CALE,sKAGE,aACF,CAGF,sCACE,6FACF,CAEA,sCACE,4FACF,CAEA,sCACE,6FACF","file":"layout.css","sourcesContent":["/* Layout */\n\n/* stylelint-disable nesting-selector-no-missing-scoping-root -- inside @define-mixin the & resolves at the @mixin include site, so there is a scoping root */\n\n@define-mixin flow-as-row {\n grid-auto-flow: row;\n grid-template-columns: 1fr !important;\n\n & .Layout-sidebar,\n & .Layout-divider,\n & .Layout-main {\n width: 100% !important;\n grid-column: 1 !important;\n }\n\n &.Layout--sidebarPosition-flowRow-start {\n & .Layout-sidebar {\n grid-row: 1;\n }\n\n & .Layout-main {\n grid-row: 2 / span 2;\n }\n }\n\n &.Layout--sidebarPosition-flowRow-end {\n & .Layout-sidebar {\n grid-row: 2 / span 2;\n }\n\n & .Layout-main {\n grid-row: 1;\n }\n }\n\n &.Layout--sidebarPosition-flowRow-none {\n & .Layout-sidebar {\n display: none;\n }\n }\n\n &.Layout--divided {\n @mixin flow-as-row-divider;\n\n & .Layout-main {\n grid-row: 3 / span 1;\n }\n\n &.Layout--sidebarPosition-flowRow-end {\n & .Layout-sidebar {\n grid-row: 3 / span 1;\n }\n\n & .Layout-main {\n grid-row: 1;\n }\n }\n }\n}\n\n@define-mixin flow-as-row-divider {\n --Layout-gutter: 0;\n\n & .Layout-divider {\n height: 1px;\n grid-row: 2;\n\n &.Layout-divider--flowRow-hidden {\n display: none;\n }\n\n &.Layout-divider--flowRow-shallow {\n height: 8px;\n margin-right: 0;\n background: var(--bgColor-inset);\n border-color: var(--borderColor-default);\n border-style: solid;\n border-width: var(--borderWidth-thin) 0;\n }\n }\n}\n\n.Layout {\n display: grid;\n\n --Layout-sidebar-width: 220px;\n --Layout-gutter: 16px;\n\n @media (max-width: calc(544px - 0.02px)) {\n @mixin flow-as-row;\n }\n\n &.Layout--flowRow-until-md {\n @media (max-width: calc(768px - 0.02px)) {\n @mixin flow-as-row;\n }\n }\n\n &.Layout--flowRow-until-lg {\n @media (max-width: calc(1012px - 0.02px)) {\n @mixin flow-as-row;\n }\n }\n\n /* Flow as column */\n\n grid-auto-flow: column;\n grid-template-columns: auto 0 minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))); /* sidebar column, separator, main column */\n gap: var(--Layout-gutter);\n\n & .Layout-sidebar {\n grid-column: 1;\n }\n\n & .Layout-divider {\n display: none;\n }\n\n & .Layout-main {\n grid-column: 2 / span 2;\n }\n\n /* Gutter spacing */\n\n @media (min-width: 1012px) {\n --Layout-gutter: 24px;\n }\n\n &.Layout--gutter-none {\n --Layout-gutter: 0px;\n }\n\n &.Layout--gutter-condensed {\n --Layout-gutter: 16px;\n }\n\n &.Layout--gutter-spacious {\n @media (min-width: 1012px) {\n --Layout-gutter: 32px;\n }\n\n @media (min-width: 1280px) {\n --Layout-gutter: 40px;\n }\n }\n\n /* Sidebar width */\n @media (min-width: 544px) {\n --Layout-sidebar-width: 220px;\n }\n\n @media (min-width: 768px) {\n --Layout-sidebar-width: 256px;\n }\n\n @media (min-width: 1012px) {\n --Layout-sidebar-width: 296px;\n }\n\n &.Layout--sidebar-narrow {\n @media (min-width: 768px) {\n --Layout-sidebar-width: 240px;\n }\n\n @media (min-width: 1012px) {\n --Layout-sidebar-width: 256px;\n }\n }\n\n &.Layout--sidebar-wide {\n @media (min-width: 1012px) {\n --Layout-sidebar-width: 320px;\n }\n\n @media (min-width: 1280px) {\n --Layout-sidebar-width: 336px;\n }\n }\n\n &.Layout--sidebar-xwide {\n @media (min-width: 1012px) {\n --Layout-sidebar-width: 408px;\n }\n\n @media (min-width: 1280px) {\n --Layout-sidebar-width: 440px;\n }\n }\n\n &.Layout--sidebar-xxwide {\n @media (min-width: 1012px) {\n --Layout-sidebar-width: 512px;\n }\n\n @media (min-width: 1280px) {\n --Layout-sidebar-width: 544px;\n }\n }\n\n /* Sidebar position */\n\n &.Layout--sidebarPosition-start {\n & .Layout-sidebar {\n grid-column: 1;\n }\n\n & .Layout-main {\n grid-column: 2 / span 2;\n }\n }\n\n &.Layout--sidebarPosition-end {\n grid-template-columns: minmax(0, calc(100% - var(--Layout-sidebar-width) - var(--Layout-gutter))) 0 auto;\n\n & .Layout-main {\n grid-column: 1;\n }\n\n & .Layout-sidebar {\n grid-column: 2 / span 2;\n }\n }\n\n /* Sidebar divider */\n\n &.Layout--divided {\n & .Layout-divider {\n display: block;\n grid-column: 2;\n width: 1px;\n /* stylelint-disable-next-line primer/spacing */\n margin-right: -1px;\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-default);\n }\n\n & .Layout-main {\n grid-column: 3 / span 1;\n }\n\n &.Layout--sidebarPosition-end {\n & .Layout-sidebar {\n grid-column: 3 / span 1;\n }\n\n & .Layout-main {\n grid-column: 1;\n }\n }\n }\n}\n\n.Layout-divider {\n display: none;\n width: 1px;\n}\n\n.Layout-sidebar {\n width: var(--Layout-sidebar-width);\n}\n\n.Layout-main {\n min-width: 0;\n\n /* Centered main column\n ** FIXME: right-aligned sidebar */\n & .Layout-main-centered-md,\n & .Layout-main-centered-lg,\n & .Layout-main-centered-xl {\n margin-right: auto;\n margin-left: auto;\n\n & > .container-md,\n & > .container-lg,\n & > .container-xl {\n margin-left: 0;\n }\n }\n\n & .Layout-main-centered-md {\n max-width: calc(var(--breakpoint-medium) + var(--Layout-sidebar-width) + var(--Layout-gutter));\n }\n\n & .Layout-main-centered-lg {\n max-width: calc(var(--breakpoint-large) + var(--Layout-sidebar-width) + var(--Layout-gutter));\n }\n\n & .Layout-main-centered-xl {\n max-width: calc(var(--breakpoint-xlarge) + var(--Layout-sidebar-width) + var(--Layout-gutter));\n }\n}\n"]}
|
|
@@ -177,6 +177,26 @@
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
&.Layout--sidebar-xwide {
|
|
181
|
+
@media (min-width: 1012px) {
|
|
182
|
+
--Layout-sidebar-width: 408px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (min-width: 1280px) {
|
|
186
|
+
--Layout-sidebar-width: 440px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&.Layout--sidebar-xxwide {
|
|
191
|
+
@media (min-width: 1012px) {
|
|
192
|
+
--Layout-sidebar-width: 512px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@media (min-width: 1280px) {
|
|
196
|
+
--Layout-sidebar-width: 544px;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
180
200
|
/* Sidebar position */
|
|
181
201
|
|
|
182
202
|
&.Layout--sidebarPosition-start {
|
|
@@ -50,7 +50,9 @@ module Primer
|
|
|
50
50
|
SIDEBAR_WIDTH_MAPPINGS = {
|
|
51
51
|
SIDEBAR_WIDTH_DEFAULT => "",
|
|
52
52
|
:narrow => "Layout--sidebar-narrow",
|
|
53
|
-
:wide => "Layout--sidebar-wide"
|
|
53
|
+
:wide => "Layout--sidebar-wide",
|
|
54
|
+
:xwide => "Layout--sidebar-xwide",
|
|
55
|
+
:xxwide => "Layout--sidebar-xxwide"
|
|
54
56
|
}.freeze
|
|
55
57
|
SIDEBAR_WIDTH_OPTIONS = SIDEBAR_WIDTH_MAPPINGS.keys.freeze
|
|
56
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ToggleSwitch,.ToggleSwitch.ToggleSwitch{display:inline-flex}.ToggleSwitch{--toggleSwitch-knob-inset:var(--borderWidth-thin);--toggleSwitch-knob-offset:calc(var(--toggleSwitch-knob-inset)*2);align-items:center;gap:var(--controlStack-medium-gap-condensed)}.ToggleSwitch--checked .ToggleSwitch-statusOn{height:auto;visibility:visible}.ToggleSwitch--checked .ToggleSwitch-statusOff{height:0;visibility:hidden}.ToggleSwitch-track{position:relative;display:block;width:var(--base-size-64);height:var(--control-medium-size);padding:0;overflow:hidden;-webkit-text-decoration:none;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;background-color:var(--controlTrack-bgColor-rest);border:var(--borderWidth-thin) solid var(--controlTrack-borderColor-rest);border-radius:var(--borderRadius-medium);transition-timing-function:cubic-bezier(.5,1,.89,1);transition-duration:80ms;transition-property:background-color,border-color;appearance:none}.ToggleSwitch-track:focus,.ToggleSwitch-track:focus-visible{outline-offset:1px}.ToggleSwitch-track:hover{background-color:var(--controlTrack-bgColor-hover)}.ToggleSwitch-track:active{background-color:var(--controlTrack-bgColor-active)}@media (pointer:coarse){:is(.ToggleSwitch-track:before){position:absolute;top:50%;left:50%;width:100%;height:100%;min-height:44px;content:"";transform:translateX(-50%) translateY(-50%)}}@media (prefers-reduced-motion){.ToggleSwitch-track,.ToggleSwitch-track *{transition:none}}.ToggleSwitch-track[aria-pressed=true][disabled]{color:var(--control-checked-fgColor-disabled);background-color:var(--controlTrack-bgColor-disabled);border-color:#0000}.ToggleSwitch-track[aria-pressed=true]{background-color:var(--control-checked-bgColor-rest);border-color:var(--borderColor-transparent)}.ToggleSwitch-track[aria-pressed=true]:not([disabled]):hover{background-color:var(--control-checked-bgColor-hover)}.ToggleSwitch-track[aria-pressed=true]:not([disabled]):active{background-color:var(--control-checked-bgColor-active)}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-knob{background-color:var(--controlKnob-bgColor-checked);border-color:var(--controlKnob-borderColor-checked);transform:translateX(calc(100% - var(--toggleSwitch-knob-offset)))}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-lineIcon{transform:translateX(0)}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-circleIcon{transform:translateX(100%)}.ToggleSwitch-track[disabled]{cursor:not-allowed;background-color:var(--controlTrack-bgColor-disabled);border-color:#0000;transition-property:none}.ToggleSwitch-track[disabled] .ToggleSwitch-knob{border-color:var(--borderColor-default)}.ToggleSwitch-track[disabled] .ToggleSwitch-circleIcon,.ToggleSwitch-track[disabled] .ToggleSwitch-lineIcon{color:var(--controlTrack-fgColor-disabled)}.ToggleSwitch-icons{display:flex;align-items:center;width:100%;height:100%;overflow:hidden}.ToggleSwitch-lineIcon{color:var(--control-checked-fgColor-rest);transform:translateX(-100%)}.ToggleSwitch-circleIcon,.ToggleSwitch-lineIcon{line-height:0;transition-duration:80ms;transition-property:transform;flex:1 0 50%}.ToggleSwitch-circleIcon{color:var(--controlTrack-fgColor-rest);transform:translateX(0)}.ToggleSwitch-knob{position:absolute;inset-block:var(--toggleSwitch-knob-inset);inset-inline-start:var(--toggleSwitch-knob-inset);z-index:1;width:50%;background-color:var(--controlKnob-bgColor-rest);border:var(--borderWidth-thin) solid var(--controlKnob-borderColor-rest);border-radius:calc(var(--borderRadius-medium) - var(--toggleSwitch-knob-offset));transition-timing-function:cubic-bezier(.5,1,.89,1);transition-duration:80ms;transition-property:transform}@media (prefers-reduced-motion){.ToggleSwitch-knob{transition:none}}.ToggleSwitch-status{position:relative;font-size:var(--text-body-size-medium);line-height:var(--text-title-lineHeight-large);color:var(--fgColor-default);text-align:right}.ToggleSwitch-statusIcon{display:flex;width:var(--base-size-16);margin-top:.063rem}.ToggleSwitch--small .ToggleSwitch-status{font-size:var(--text-body-size-small)}.ToggleSwitch--small .ToggleSwitch-track{width:var(--base-size-48);height:var(--control-xsmall-size)}.ToggleSwitch--disabled .ToggleSwitch-status{color:var(--fgColor-muted)}.ToggleSwitch-statusOn{height:0;visibility:hidden}.ToggleSwitch-statusOff{height:auto;visibility:visible}.ToggleSwitch--statusAtEnd{flex-direction:row-reverse}.ToggleSwitch--statusAtEnd .ToggleSwitch-status{text-align:left}
|
|
1
|
+
.ToggleSwitch,.ToggleSwitch.ToggleSwitch{display:inline-flex}.ToggleSwitch{--toggleSwitch-knob-inset:var(--borderWidth-thin);--toggleSwitch-knob-offset:calc(var(--toggleSwitch-knob-inset)*2);align-items:center;gap:var(--controlStack-medium-gap-condensed)}.ToggleSwitch--checked .ToggleSwitch-statusOn{height:auto;visibility:visible}.ToggleSwitch--checked .ToggleSwitch-statusOff{height:0;visibility:hidden}.ToggleSwitch-track{position:relative;display:block;width:var(--base-size-64);height:var(--control-medium-size);padding:0;overflow:hidden;-webkit-text-decoration:none;text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;background-color:var(--controlTrack-bgColor-rest);border:var(--borderWidth-thin) solid var(--controlTrack-borderColor-rest);border-radius:var(--borderRadius-medium);transition-timing-function:cubic-bezier(.5,1,.89,1);transition-duration:80ms;transition-property:background-color,border-color;appearance:none}.ToggleSwitch-track:focus,.ToggleSwitch-track:focus-visible{outline-offset:1px}.ToggleSwitch-track:hover{background-color:var(--controlTrack-bgColor-hover)}.ToggleSwitch-track:active{background-color:var(--controlTrack-bgColor-active)}@media (pointer:coarse){:is(.ToggleSwitch-track:before){position:absolute;top:50%;left:50%;width:100%;height:100%;min-height:44px;content:"";transform:translateX(-50%) translateY(-50%)}}@media (prefers-reduced-motion){.ToggleSwitch-track,.ToggleSwitch-track *{transition:none}}.ToggleSwitch-track[aria-pressed=true][disabled]{color:var(--control-checked-fgColor-disabled);background-color:var(--controlTrack-bgColor-disabled);border-color:#0000}.ToggleSwitch-track[aria-pressed=true]{background-color:var(--control-checked-bgColor-rest);border-color:var(--borderColor-transparent)}.ToggleSwitch-track[aria-pressed=true]:not([disabled]):hover{background-color:var(--control-checked-bgColor-hover)}.ToggleSwitch-track[aria-pressed=true]:not([disabled]):active{background-color:var(--control-checked-bgColor-active)}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-knob{background-color:var(--controlKnob-bgColor-checked);border-color:var(--controlKnob-borderColor-checked);transform:translateX(calc(100% - var(--toggleSwitch-knob-offset)))}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-lineIcon{transform:translateX(0)}.ToggleSwitch-track[aria-pressed=true] .ToggleSwitch-circleIcon{transform:translateX(100%)}.ToggleSwitch-track[disabled]{cursor:not-allowed;background-color:var(--controlTrack-bgColor-disabled);border-color:#0000;transition-property:none}.ToggleSwitch-track[disabled] .ToggleSwitch-knob{border-color:var(--borderColor-default)}.ToggleSwitch-track[disabled] .ToggleSwitch-circleIcon,.ToggleSwitch-track[disabled] .ToggleSwitch-lineIcon{color:var(--controlTrack-fgColor-disabled)}.ToggleSwitch-icons{display:flex;align-items:center;width:100%;height:100%;overflow:hidden}.ToggleSwitch-lineIcon{color:var(--control-checked-fgColor-rest);transform:translateX(-100%)}.ToggleSwitch-circleIcon,.ToggleSwitch-lineIcon{line-height:0;transition-duration:80ms;transition-property:transform;flex:1 0 50%}.ToggleSwitch-circleIcon{color:var(--controlTrack-fgColor-rest);transform:translateX(0)}.ToggleSwitch-knob{position:absolute;inset-block:var(--toggleSwitch-knob-inset);inset-inline-start:var(--toggleSwitch-knob-inset);z-index:1;width:50%;background-color:var(--controlKnob-bgColor-rest);border:var(--borderWidth-thin) solid var(--controlKnob-borderColor-rest);border-radius:calc(var(--borderRadius-medium) - var(--toggleSwitch-knob-offset));transition-timing-function:cubic-bezier(.5,1,.89,1);transition-duration:80ms;transition-property:transform}@media (prefers-reduced-motion){.ToggleSwitch-knob{transition:none}}.ToggleSwitch-status{position:relative;font-size:var(--text-body-size-medium);line-height:var(--text-title-lineHeight-large);color:var(--fgColor-default);text-align:right}.ToggleSwitch-statusIcon{display:flex;flex:none;align-items:center;justify-content:center;width:var(--base-size-16);height:var(--base-size-16);line-height:0;margin-top:.063rem}.ToggleSwitch--small .ToggleSwitch-status{font-size:var(--text-body-size-small)}.ToggleSwitch--small .ToggleSwitch-track{width:var(--base-size-48);height:var(--control-xsmall-size)}.ToggleSwitch--disabled .ToggleSwitch-status{color:var(--fgColor-muted)}.ToggleSwitch-statusOn{height:0;visibility:hidden}.ToggleSwitch-statusOff{height:auto;visibility:visible}.ToggleSwitch--statusAtEnd{flex-direction:row-reverse}.ToggleSwitch--statusAtEnd .ToggleSwitch-status{text-align:left}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["toggle_switch.pcss","<no source>"],"names":[],"mappings":"AAQA,yCAHE,mBAUF,CAPA,cACE,iDAAkD,CAClD,iEAAoE,CAEpE,kBAAmB,CAEnB,4CACF,CAGE,8CACE,WAAY,CACZ,kBACF,CAEA,+CACE,QAAS,CACT,iBACF,CAGF,oBACE,iBAAkB,CAClB,aAAc,CACd,yBAA0B,CAC1B,iCAAkC,CAClC,SAAU,CACV,eAAgB,CAChB,4BAAqB,CAArB,oBAAqB,CACrB,cAAe,CACf,wBAAiB,CAAjB,gBAAiB,CACjB,iDAAkD,CAClD,yEAA0E,CAC1E,wCAAyC,CACzC,mDAAyD,CACzD,wBAAyB,CACzB,iDAAmD,CACnD,eA4BF,CA1BE,4DAEE,kBACF,CAEA,0BACE,kDACF,CAEA,2BACE,mDACF,CAEA,wBAEI,gCC9DN,kBAAA,QAAA,SAAA,WAAA,YAAA,gBAAA,WAAA,2CD8DgC,CAE9B,CAEA,gCAGE,0CACE,eACF,CACF,CAGF,iDACE,6CAA8C,CAC9C,qDAAsD,CACtD,kBACF,CAEA,uCACE,oDAAqD,CACrD,2CAyBF,CAtBI,6DACE,qDACF,CAEA,8DACE,sDACF,CAGF,0DACE,mDAAoD,CACpD,mDAAoD,CACpD,kEACF,CAEA,8DACE,uBACF,CAEA,gEACE,0BACF,CAGF,8BACE,kBAAmB,CACnB,qDAAsD,CACtD,kBAAyB,CACzB,wBAaF,CAXE,iDACE,uCACF,CAMA,4GACE,0CACF,CAGF,oBACE,YAAa,CACb,kBAAmB,CACnB,UAAW,CACX,WAAY,CACZ,eACF,CAEA,uBAGE,yCAA0C,CAG1C,2BAEF,CAEA,gDARE,aAAc,CAEd,wBAAyB,CACzB,6BAA8B,CAE9B,YAWF,CARA,yBAGE,sCAAuC,CAGvC,uBAEF,CAEA,mBACE,iBAAkB,CAClB,0CAA2C,CAC3C,iDAAkD,CAClD,SAAU,CACV,SAAU,CACV,gDAAiD,CACjD,wEAAyE,CAEzE,gFAAiF,CACjF,mDAAyD,CACzD,wBAAyB,CACzB,6BAKF,CAHE,gCAdF,mBAeI,eAEJ,CADE,CAGF,qBACE,iBAAkB,CAClB,sCAAuC,CACvC,8CAA+C,CAC/C,4BAA6B,CAC7B,gBACF,CAEA,yBACE,YAAa,CACb,yBAA0B,
|
|
1
|
+
{"version":3,"sources":["toggle_switch.pcss","<no source>"],"names":[],"mappings":"AAQA,yCAHE,mBAUF,CAPA,cACE,iDAAkD,CAClD,iEAAoE,CAEpE,kBAAmB,CAEnB,4CACF,CAGE,8CACE,WAAY,CACZ,kBACF,CAEA,+CACE,QAAS,CACT,iBACF,CAGF,oBACE,iBAAkB,CAClB,aAAc,CACd,yBAA0B,CAC1B,iCAAkC,CAClC,SAAU,CACV,eAAgB,CAChB,4BAAqB,CAArB,oBAAqB,CACrB,cAAe,CACf,wBAAiB,CAAjB,gBAAiB,CACjB,iDAAkD,CAClD,yEAA0E,CAC1E,wCAAyC,CACzC,mDAAyD,CACzD,wBAAyB,CACzB,iDAAmD,CACnD,eA4BF,CA1BE,4DAEE,kBACF,CAEA,0BACE,kDACF,CAEA,2BACE,mDACF,CAEA,wBAEI,gCC9DN,kBAAA,QAAA,SAAA,WAAA,YAAA,gBAAA,WAAA,2CD8DgC,CAE9B,CAEA,gCAGE,0CACE,eACF,CACF,CAGF,iDACE,6CAA8C,CAC9C,qDAAsD,CACtD,kBACF,CAEA,uCACE,oDAAqD,CACrD,2CAyBF,CAtBI,6DACE,qDACF,CAEA,8DACE,sDACF,CAGF,0DACE,mDAAoD,CACpD,mDAAoD,CACpD,kEACF,CAEA,8DACE,uBACF,CAEA,gEACE,0BACF,CAGF,8BACE,kBAAmB,CACnB,qDAAsD,CACtD,kBAAyB,CACzB,wBAaF,CAXE,iDACE,uCACF,CAMA,4GACE,0CACF,CAGF,oBACE,YAAa,CACb,kBAAmB,CACnB,UAAW,CACX,WAAY,CACZ,eACF,CAEA,uBAGE,yCAA0C,CAG1C,2BAEF,CAEA,gDARE,aAAc,CAEd,wBAAyB,CACzB,6BAA8B,CAE9B,YAWF,CARA,yBAGE,sCAAuC,CAGvC,uBAEF,CAEA,mBACE,iBAAkB,CAClB,0CAA2C,CAC3C,iDAAkD,CAClD,SAAU,CACV,SAAU,CACV,gDAAiD,CACjD,wEAAyE,CAEzE,gFAAiF,CACjF,mDAAyD,CACzD,wBAAyB,CACzB,6BAKF,CAHE,gCAdF,mBAeI,eAEJ,CADE,CAGF,qBACE,iBAAkB,CAClB,sCAAuC,CACvC,8CAA+C,CAC/C,4BAA6B,CAC7B,gBACF,CAEA,yBACE,YAAa,CACb,SAAU,CACV,kBAAmB,CACnB,sBAAuB,CACvB,yBAA0B,CAC1B,0BAA2B,CAE3B,aAAc,CAEd,kBACF,CAGE,0CACE,qCACF,CAEA,yCACE,yBAA0B,CAC1B,iCACF,CAIA,6CACE,0BACF,CAGF,uBACE,QAAS,CACT,iBACF,CAEA,wBACE,WAAY,CACZ,kBACF,CAEA,2BACE,0BAKF,CAHE,gDACE,eACF","file":"toggle_switch.css","sourcesContent":["/* ToggleSwitch */\n\n/* Catalyst in dotcom applies a display: block to all web component elements. This\n** rule overrides it so the status label and toggle switch are laid out correctly. */\n.ToggleSwitch.ToggleSwitch {\n display: inline-flex;\n}\n\n.ToggleSwitch {\n --toggleSwitch-knob-inset: var(--borderWidth-thin);\n --toggleSwitch-knob-offset: calc(2 * var(--toggleSwitch-knob-inset));\n\n align-items: center;\n display: inline-flex;\n gap: var(--controlStack-medium-gap-condensed);\n}\n\n.ToggleSwitch--checked {\n & .ToggleSwitch-statusOn {\n height: auto;\n visibility: visible;\n }\n\n & .ToggleSwitch-statusOff {\n height: 0;\n visibility: hidden;\n }\n}\n\n.ToggleSwitch-track {\n position: relative;\n display: block;\n width: var(--base-size-64);\n height: var(--control-medium-size);\n padding: 0;\n overflow: hidden;\n text-decoration: none;\n cursor: pointer;\n user-select: none;\n background-color: var(--controlTrack-bgColor-rest);\n border: var(--borderWidth-thin) solid var(--controlTrack-borderColor-rest);\n border-radius: var(--borderRadius-medium);\n transition-timing-function: cubic-bezier(0.5, 1, 0.89, 1);\n transition-duration: 80ms;\n transition-property: background-color, border-color;\n appearance: none;\n\n &:focus,\n &:focus-visible {\n outline-offset: 1px;\n }\n\n &:hover {\n background-color: var(--controlTrack-bgColor-hover);\n }\n\n &:active {\n background-color: var(--controlTrack-bgColor-active);\n }\n\n @media (pointer: coarse) {\n &::before {\n @mixin minTouchTarget 44px;\n }\n }\n\n @media (prefers-reduced-motion) {\n transition: none;\n\n & * {\n transition: none;\n }\n }\n}\n\n.ToggleSwitch-track[aria-pressed='true'][disabled] {\n color: var(--control-checked-fgColor-disabled);\n background-color: var(--controlTrack-bgColor-disabled);\n border-color: transparent;\n}\n\n.ToggleSwitch-track[aria-pressed='true'] {\n background-color: var(--control-checked-bgColor-rest);\n border-color: var(--borderColor-transparent);\n\n &:not([disabled]) {\n &:hover {\n background-color: var(--control-checked-bgColor-hover);\n }\n\n &:active {\n background-color: var(--control-checked-bgColor-active);\n }\n }\n\n & .ToggleSwitch-knob {\n background-color: var(--controlKnob-bgColor-checked);\n border-color: var(--controlKnob-borderColor-checked);\n transform: translateX(calc(100% - var(--toggleSwitch-knob-offset)));\n }\n\n & .ToggleSwitch-lineIcon {\n transform: translateX(0%);\n }\n\n & .ToggleSwitch-circleIcon {\n transform: translateX(100%);\n }\n}\n\n.ToggleSwitch-track[disabled] {\n cursor: not-allowed;\n background-color: var(--controlTrack-bgColor-disabled);\n border-color: transparent;\n transition-property: none;\n\n & .ToggleSwitch-knob {\n border-color: var(--borderColor-default);\n }\n\n & .ToggleSwitch-lineIcon {\n color: var(--controlTrack-fgColor-disabled);\n }\n\n & .ToggleSwitch-circleIcon {\n color: var(--controlTrack-fgColor-disabled);\n }\n}\n\n.ToggleSwitch-icons {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.ToggleSwitch-lineIcon {\n /* stylelint-disable-next-line primer/typography */\n line-height: 0;\n color: var(--control-checked-fgColor-rest);\n transition-duration: 80ms;\n transition-property: transform;\n transform: translateX(-100%);\n flex: 1 0 50%;\n}\n\n.ToggleSwitch-circleIcon {\n /* stylelint-disable-next-line primer/typography */\n line-height: 0;\n color: var(--controlTrack-fgColor-rest);\n transition-duration: 80ms;\n transition-property: transform;\n transform: translateX(0);\n flex: 1 0 50%;\n}\n\n.ToggleSwitch-knob {\n position: absolute;\n inset-block: var(--toggleSwitch-knob-inset);\n inset-inline-start: var(--toggleSwitch-knob-inset);\n z-index: 1;\n width: 50%;\n background-color: var(--controlKnob-bgColor-rest);\n border: var(--borderWidth-thin) solid var(--controlKnob-borderColor-rest);\n /* stylelint-disable-next-line primer/borders */\n border-radius: calc(var(--borderRadius-medium) - var(--toggleSwitch-knob-offset));\n transition-timing-function: cubic-bezier(0.5, 1, 0.89, 1);\n transition-duration: 80ms;\n transition-property: transform;\n\n @media (prefers-reduced-motion) {\n transition: none;\n }\n}\n\n.ToggleSwitch-status {\n position: relative;\n font-size: var(--text-body-size-medium);\n line-height: var(--text-title-lineHeight-large);\n color: var(--fgColor-default);\n text-align: right;\n}\n\n.ToggleSwitch-statusIcon {\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: var(--base-size-16);\n height: var(--base-size-16);\n /* stylelint-disable-next-line primer/typography */\n line-height: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin-top: 0.063rem;\n}\n\n.ToggleSwitch--small {\n & .ToggleSwitch-status {\n font-size: var(--text-body-size-small);\n }\n\n & .ToggleSwitch-track {\n width: var(--base-size-48);\n height: var(--control-xsmall-size);\n }\n}\n\n.ToggleSwitch--disabled {\n & .ToggleSwitch-status {\n color: var(--fgColor-muted);\n }\n}\n\n.ToggleSwitch-statusOn {\n height: 0;\n visibility: hidden;\n}\n\n.ToggleSwitch-statusOff {\n height: auto;\n visibility: visible;\n}\n\n.ToggleSwitch--statusAtEnd {\n flex-direction: row-reverse;\n\n & .ToggleSwitch-status {\n text-align: left;\n }\n}\n",null]}
|
|
@@ -184,7 +184,13 @@
|
|
|
184
184
|
|
|
185
185
|
.ToggleSwitch-statusIcon {
|
|
186
186
|
display: flex;
|
|
187
|
+
flex: none;
|
|
188
|
+
align-items: center;
|
|
189
|
+
justify-content: center;
|
|
187
190
|
width: var(--base-size-16);
|
|
191
|
+
height: var(--base-size-16);
|
|
192
|
+
/* stylelint-disable-next-line primer/typography */
|
|
193
|
+
line-height: 0;
|
|
188
194
|
/* stylelint-disable-next-line primer/spacing */
|
|
189
195
|
margin-top: 0.063rem;
|
|
190
196
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<%= loader %>
|
|
3
3
|
<% else %>
|
|
4
4
|
<% unless no_items_message? %>
|
|
5
|
-
<%
|
|
5
|
+
<% with_no_items_message_content(I18n.t("tree_view.label_empty_sub_tree")) # Set the default %>
|
|
6
6
|
<% end %>
|
|
7
7
|
|
|
8
8
|
<%= render(@container) do %>
|
|
9
9
|
<% if nodes.empty? %>
|
|
10
|
-
<%= render(Primer::Alpha::TreeView::Node.new(path:
|
|
10
|
+
<%= render(Primer::Alpha::TreeView::Node.new(path: no_items_message_path, node_variant: :div, disabled: true)) do |node| %>
|
|
11
11
|
<% node.with_text_content do %>
|
|
12
12
|
<%= no_items_message %>
|
|
13
13
|
<% end %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SelectStrategy, SelectVariant, TreeViewSubTreeNodeElement } from './tree_view_sub_tree_node_element';
|
|
1
|
+
import { type SelectStrategy, type SelectVariant, TreeViewSubTreeNodeElement } from './tree_view_sub_tree_node_element';
|
|
2
2
|
import type { TreeViewCheckedValue, TreeViewNodeInfo, TreeViewNodeType } from '../../shared_events';
|
|
3
3
|
export declare class TreeViewElement extends HTMLElement {
|
|
4
4
|
#private;
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
16
16
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
17
|
};
|
|
18
|
-
var _TreeViewElement_instances, _TreeViewElement_abortController, _TreeViewElement_autoExpandFrom, _TreeViewElement_eventIsActivation, _TreeViewElement_nodeForEvent, _TreeViewElement_handleNodeEvent, _TreeViewElement_eventIsCheckboxToggle, _TreeViewElement_handleCheckboxToggle, _TreeViewElement_eventIsSingleSelection, _TreeViewElement_handleNodeActivated, _TreeViewElement_handleNodeFocused, _TreeViewElement_handleNodeKeyboardEvent, _TreeViewElement_checkNodeOnly;
|
|
18
|
+
var _TreeViewElement_instances, _TreeViewElement_abortController, _TreeViewElement_containsCheckedTreeItem, _TreeViewElement_autoExpandFrom, _TreeViewElement_eventIsActivation, _TreeViewElement_nodeForEvent, _TreeViewElement_handleNodeEvent, _TreeViewElement_eventIsCheckboxToggle, _TreeViewElement_handleCheckboxToggle, _TreeViewElement_eventIsSingleSelection, _TreeViewElement_handleNodeActivated, _TreeViewElement_handleNodeFocused, _TreeViewElement_handleNodeKeyboardEvent, _TreeViewElement_checkNodeOnly;
|
|
19
19
|
import { controller, target } from '@github/catalyst';
|
|
20
20
|
import { useRovingTabIndex } from './tree_view_roving_tab_index';
|
|
21
21
|
let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
@@ -36,7 +36,6 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
36
36
|
for (const addedNode of mutation.addedNodes) {
|
|
37
37
|
if (!(addedNode instanceof HTMLElement))
|
|
38
38
|
continue;
|
|
39
|
-
// eslint-disable-next-line custom-elements/no-dom-traversal-in-connectedcallback
|
|
40
39
|
if (addedNode.querySelector('[aria-expanded=true]')) {
|
|
41
40
|
__classPrivateFieldGet(this, _TreeViewElement_instances, "m", _TreeViewElement_autoExpandFrom).call(this, addedNode);
|
|
42
41
|
}
|
|
@@ -50,6 +49,9 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
50
49
|
// nodes based on the component's select strategy. These two observers can conflict and cause infinite
|
|
51
50
|
// looping, so we make sure something actually changed before computing inputs again.
|
|
52
51
|
const somethingChanged = mutations.some(m => {
|
|
52
|
+
if (m.type === 'childList') {
|
|
53
|
+
return __classPrivateFieldGet(this, _TreeViewElement_instances, "m", _TreeViewElement_containsCheckedTreeItem).call(this, m.addedNodes) || __classPrivateFieldGet(this, _TreeViewElement_instances, "m", _TreeViewElement_containsCheckedTreeItem).call(this, m.removedNodes);
|
|
54
|
+
}
|
|
53
55
|
if (!(m.target instanceof HTMLElement))
|
|
54
56
|
return false;
|
|
55
57
|
return m.target.getAttribute('aria-checked') !== m.oldValue;
|
|
@@ -62,6 +64,7 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
62
64
|
childList: true,
|
|
63
65
|
subtree: true,
|
|
64
66
|
attributeFilter: ['aria-checked'],
|
|
67
|
+
attributeOldValue: true,
|
|
65
68
|
});
|
|
66
69
|
// Correctly initialize the form
|
|
67
70
|
if (this.formInputContainer) {
|
|
@@ -278,7 +281,6 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
278
281
|
}
|
|
279
282
|
updateHiddenFormInputs() {
|
|
280
283
|
const newInputs = [];
|
|
281
|
-
// eslint-disable-next-line custom-elements/no-dom-traversal-in-connectedcallback
|
|
282
284
|
for (const node of this.querySelectorAll('[role=treeitem][aria-checked=true]')) {
|
|
283
285
|
const newInput = this.formInputPrototype.cloneNode();
|
|
284
286
|
newInput.removeAttribute('data-target');
|
|
@@ -300,6 +302,14 @@ let TreeViewElement = class TreeViewElement extends HTMLElement {
|
|
|
300
302
|
};
|
|
301
303
|
_TreeViewElement_abortController = new WeakMap();
|
|
302
304
|
_TreeViewElement_instances = new WeakSet();
|
|
305
|
+
_TreeViewElement_containsCheckedTreeItem = function _TreeViewElement_containsCheckedTreeItem(nodes) {
|
|
306
|
+
return [...nodes].some(node => {
|
|
307
|
+
if (!(node instanceof Element))
|
|
308
|
+
return false;
|
|
309
|
+
return (node.matches('[role=treeitem][aria-checked=true]') ||
|
|
310
|
+
Boolean(node.querySelector('[role=treeitem][aria-checked=true]')));
|
|
311
|
+
});
|
|
312
|
+
};
|
|
303
313
|
_TreeViewElement_autoExpandFrom = function _TreeViewElement_autoExpandFrom(root) {
|
|
304
314
|
for (const element of root.querySelectorAll('[aria-expanded=true]')) {
|
|
305
315
|
this.expandAncestorsForNode(element);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {controller, target} from '@github/catalyst'
|
|
2
|
-
import {SelectStrategy, SelectVariant, TreeViewSubTreeNodeElement} from './tree_view_sub_tree_node_element'
|
|
2
|
+
import {type SelectStrategy, type SelectVariant, TreeViewSubTreeNodeElement} from './tree_view_sub_tree_node_element'
|
|
3
3
|
import {useRovingTabIndex} from './tree_view_roving_tab_index'
|
|
4
4
|
import type {TreeViewCheckedValue, TreeViewNodeInfo, TreeViewNodeType} from '../../shared_events'
|
|
5
5
|
|
|
@@ -24,7 +24,6 @@ export class TreeViewElement extends HTMLElement {
|
|
|
24
24
|
for (const addedNode of mutation.addedNodes) {
|
|
25
25
|
if (!(addedNode instanceof HTMLElement)) continue
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line custom-elements/no-dom-traversal-in-connectedcallback
|
|
28
27
|
if (addedNode.querySelector('[aria-expanded=true]')) {
|
|
29
28
|
this.#autoExpandFrom(addedNode)
|
|
30
29
|
}
|
|
@@ -39,6 +38,10 @@ export class TreeViewElement extends HTMLElement {
|
|
|
39
38
|
// nodes based on the component's select strategy. These two observers can conflict and cause infinite
|
|
40
39
|
// looping, so we make sure something actually changed before computing inputs again.
|
|
41
40
|
const somethingChanged = mutations.some(m => {
|
|
41
|
+
if (m.type === 'childList') {
|
|
42
|
+
return this.#containsCheckedTreeItem(m.addedNodes) || this.#containsCheckedTreeItem(m.removedNodes)
|
|
43
|
+
}
|
|
44
|
+
|
|
42
45
|
if (!(m.target instanceof HTMLElement)) return false
|
|
43
46
|
return m.target.getAttribute('aria-checked') !== m.oldValue
|
|
44
47
|
})
|
|
@@ -52,6 +55,7 @@ export class TreeViewElement extends HTMLElement {
|
|
|
52
55
|
childList: true,
|
|
53
56
|
subtree: true,
|
|
54
57
|
attributeFilter: ['aria-checked'],
|
|
58
|
+
attributeOldValue: true,
|
|
55
59
|
})
|
|
56
60
|
|
|
57
61
|
// Correctly initialize the form
|
|
@@ -66,6 +70,17 @@ export class TreeViewElement extends HTMLElement {
|
|
|
66
70
|
})
|
|
67
71
|
}
|
|
68
72
|
|
|
73
|
+
#containsCheckedTreeItem(nodes: NodeList): boolean {
|
|
74
|
+
return [...nodes].some(node => {
|
|
75
|
+
if (!(node instanceof Element)) return false
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
node.matches('[role=treeitem][aria-checked=true]') ||
|
|
79
|
+
Boolean(node.querySelector('[role=treeitem][aria-checked=true]'))
|
|
80
|
+
)
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
|
|
69
84
|
rootLeafNodes(): NodeListOf<HTMLElement> {
|
|
70
85
|
return this.querySelectorAll(':scope > ul > li > .TreeViewItemContainer [role=treeitem]')
|
|
71
86
|
}
|
|
@@ -485,7 +500,6 @@ export class TreeViewElement extends HTMLElement {
|
|
|
485
500
|
updateHiddenFormInputs() {
|
|
486
501
|
const newInputs = []
|
|
487
502
|
|
|
488
|
-
// eslint-disable-next-line custom-elements/no-dom-traversal-in-connectedcallback
|
|
489
503
|
for (const node of this.querySelectorAll('[role=treeitem][aria-checked=true]')) {
|
|
490
504
|
const newInput = this.formInputPrototype.cloneNode() as HTMLInputElement
|
|
491
505
|
newInput.removeAttribute('data-target')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.TreeViewRootUlStyles{padding:0;margin:0;list-style:none}.TreeViewRootUlStyles .TreeViewItem{outline:none}:is(.TreeViewRootUlStyles .TreeViewItem):focus-visible>div{box-shadow:var(--boxShadow-thick) var(--fgColor-accent)}@media (forced-colors:active){:is(.TreeViewRootUlStyles .TreeViewItem):focus-visible>div{outline:2px solid HighlightText;outline-offset:-2}}.TreeViewRootUlStyles .TreeViewItemContainer{--level:1;--toggle-width:1rem;--min-item-height:2rem;position:relative;display:grid;width:100%;font-size:var(--text-body-size-medium);color:var(--fgColor-default);border-radius:var(--borderRadius-medium);grid-template-columns:var(--spacer-width) var(--leading-action-width) var(--toggle-width) 1fr var(--trailing-action-width);grid-template-areas:"spacer leadingAction toggle content trailingAction";--leading-action-width:calc(var(--has-leading-action, 0)*1.5rem);--trailing-action-width:calc(var(--has-trailing-action, 0)*1.5rem);--spacer-width:calc((var(--level) - 1)*(var(--toggle-width)/2))}:is(.TreeViewRootUlStyles .TreeViewItemContainer):has([data-has-leading-action]){--has-leading-action:1}:is(.TreeViewRootUlStyles .TreeViewItemContainer):has([data-has-trailing-action]){--has-trailing-action:1}:is(.TreeViewRootUlStyles .TreeViewItemContainer):hover{background-color:var(--control-transparent-bgColor-hover)}@media (forced-colors:active){:is(.TreeViewRootUlStyles .TreeViewItemContainer):hover{outline:2px solid #0000;outline-offset:-2px}}@media (pointer:coarse){.TreeViewRootUlStyles .TreeViewItemContainer{--toggle-width:1.5rem;--min-item-height:2.75rem}}:is(.TreeViewRootUlStyles .TreeViewItemContainer):has(.TreeViewFailureMessage):hover{cursor:default;background-color:initial}@media (forced-colors:active){:is(.TreeViewRootUlStyles .TreeViewItemContainer):has(.TreeViewFailureMessage):hover{outline:none}}:is(.TreeViewRootUlStyles .TreeViewItemContainer):has([role=treeitem]:focus-visible){box-shadow:var(--boxShadow-thick) var(--fgColor-accent)}.TreeViewRootUlStyles:where([data-omit-spacer=true]) .TreeViewItemContainer{grid-template-columns:0 0 0 1fr}.TreeViewRootUlStyles .TreeViewItem>.TreeViewItemContainer:has(.TreeViewItemContent[aria-current=true]){background-color:var(--control-transparent-bgColor-selected)}:is(.TreeViewRootUlStyles .TreeViewItem>.TreeViewItemContainer:has(.TreeViewItemContent[aria-current=true])):after{position:absolute;top:calc(50% - var(--base-size-12));left:calc(var(--base-size-8)*-1);width:.25rem;height:1.5rem;content:"";background-color:var(--fgColor-accent);border-radius:var(--borderRadius-medium)}@media (forced-colors:active){:is(.TreeViewRootUlStyles .TreeViewItem>.TreeViewItemContainer:has(.TreeViewItemContent[aria-current=true])):after{background-color:HighlightText}}.TreeViewRootUlStyles .TreeViewItemToggle{display:flex;height:100%;padding-top:calc(var(--min-item-height)/2 - var(--base-size-12)/2);color:var(--fgColor-muted);grid-area:toggle;justify-content:center;align-items:flex-start;cursor:pointer}.TreeViewRootUlStyles .TreeViewItemToggleHover:hover{background-color:var(--control-transparent-bgColor-hover)}.TreeViewRootUlStyles .TreeViewItemToggleEnd{border-top-left-radius:var(--borderRadius-medium);border-bottom-left-radius:var(--borderRadius-medium)}.TreeViewRootUlStyles :is(a.TreeViewItemContent:hover,button.TreeViewItemContent:hover){-webkit-text-decoration:underline;text-decoration:underline;text-decoration-color:var(--control-fgColor-rest)}.TreeViewRootUlStyles :has(.TreeViewItemContent[aria-disabled=true]){cursor:not-allowed}.TreeViewRootUlStyles .TreeViewItemContent{display:flex;align-items:center;height:100%;padding:0 var(--base-size-8);outline:none;cursor:pointer;padding-top:calc((var(--min-item-height) - var(--custom-line-height, 1.3rem))/2);padding-bottom:calc((var(--min-item-height) - var(--custom-line-height, 1.3rem))/2);line-height:var(--custom-line-height,var(--text-body-lineHeight-medium,1.4285));grid-area:content;gap:var(--stack-gap-condensed)}.TreeViewRootUlStyles .TreeViewItemContent,:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemCheckbox{text-align:left;-webkit-user-select:none;user-select:none;background-color:initial;border:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemCheckbox{position:relative;color:var(--control-fgColor-rest);border-radius:var(--borderRadius-medium);transition:background 33.333ms linear}[aria-checked=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .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([aria-checked=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .FormControl-checkbox):before{visibility:visible;transition:visibility 0s linear 0s;animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards}[aria-checked=false]:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItem-singleSelectCheckmark{visibility:hidden}[aria-checked=mixed]:is(.TreeViewRootUlStyles .TreeViewItemContent) .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([aria-checked=mixed]:is(.TreeViewRootUlStyles .TreeViewItemContent) .FormControl-checkbox):before{visibility:visible;mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIyIiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMTAgMiI+PHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMCAxYTEgMSAwIDAgMSAxLTFoOGExIDEgMCAxIDEgMCAySDFhMSAxIDAgMCAxLTEtMSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+");animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards;clip-path:none}[aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent){pointer-events:none}[aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemContentText{color:var(--control-fgColor-disabled)}:is([aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemVisual) svg,[aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemVisual{fill:var(--control-fgColor-disabled)}@media (hover:hover){:is([aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .FormControl-checkbox):hover{cursor:not-allowed}[aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent):hover{cursor:not-allowed;background-color:initial}}.TreeViewRootUlStyles .TreeViewItemContentText{color:var(--control-fgColor-rest);flex:1 1 auto;width:0}.TreeViewRootUlStyles:where([data-truncate-text=true]) .TreeViewItemContentText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TreeViewRootUlStyles:where([data-truncate-text=false]) .TreeViewItemContentText{word-break:break-word}.TreeViewRootUlStyles .TreeViewItemVisual{display:flex;align-self:
|
|
1
|
+
.TreeViewRootUlStyles{padding:0;margin:0;list-style:none}.TreeViewRootUlStyles .TreeViewItem{outline:none}:is(.TreeViewRootUlStyles .TreeViewItem):focus-visible>div{box-shadow:var(--boxShadow-thick) var(--fgColor-accent)}@media (forced-colors:active){:is(.TreeViewRootUlStyles .TreeViewItem):focus-visible>div{outline:2px solid HighlightText;outline-offset:-2}}.TreeViewRootUlStyles .TreeViewItemContainer{--level:1;--toggle-width:1rem;--min-item-height:2rem;position:relative;display:grid;width:100%;font-size:var(--text-body-size-medium);color:var(--fgColor-default);border-radius:var(--borderRadius-medium);grid-template-columns:var(--spacer-width) var(--leading-action-width) var(--toggle-width) 1fr var(--trailing-action-width);grid-template-areas:"spacer leadingAction toggle content trailingAction";--leading-action-width:calc(var(--has-leading-action, 0)*1.5rem);--trailing-action-width:calc(var(--has-trailing-action, 0)*1.5rem);--spacer-width:calc((var(--level) - 1)*(var(--toggle-width)/2))}:is(.TreeViewRootUlStyles .TreeViewItemContainer):has([data-has-leading-action]){--has-leading-action:1}:is(.TreeViewRootUlStyles .TreeViewItemContainer):has([data-has-trailing-action]){--has-trailing-action:1}:is(.TreeViewRootUlStyles .TreeViewItemContainer):hover{background-color:var(--control-transparent-bgColor-hover)}@media (forced-colors:active){:is(.TreeViewRootUlStyles .TreeViewItemContainer):hover{outline:2px solid #0000;outline-offset:-2px}}@media (pointer:coarse){.TreeViewRootUlStyles .TreeViewItemContainer{--toggle-width:1.5rem;--min-item-height:2.75rem}}:is(.TreeViewRootUlStyles .TreeViewItemContainer):has(.TreeViewFailureMessage):hover{cursor:default;background-color:initial}@media (forced-colors:active){:is(.TreeViewRootUlStyles .TreeViewItemContainer):has(.TreeViewFailureMessage):hover{outline:none}}:is(.TreeViewRootUlStyles .TreeViewItemContainer):has([role=treeitem]:focus-visible){box-shadow:var(--boxShadow-thick) var(--fgColor-accent)}.TreeViewRootUlStyles:where([data-omit-spacer=true]) .TreeViewItemContainer{grid-template-columns:0 0 0 1fr}.TreeViewRootUlStyles .TreeViewItem>.TreeViewItemContainer:has(.TreeViewItemContent[aria-current=true]){background-color:var(--control-transparent-bgColor-selected)}:is(.TreeViewRootUlStyles .TreeViewItem>.TreeViewItemContainer:has(.TreeViewItemContent[aria-current=true])):after{position:absolute;top:calc(50% - var(--base-size-12));left:calc(var(--base-size-8)*-1);width:.25rem;height:1.5rem;content:"";background-color:var(--fgColor-accent);border-radius:var(--borderRadius-medium)}@media (forced-colors:active){:is(.TreeViewRootUlStyles .TreeViewItem>.TreeViewItemContainer:has(.TreeViewItemContent[aria-current=true])):after{background-color:HighlightText}}.TreeViewRootUlStyles .TreeViewItemToggle{display:flex;height:100%;padding-top:calc(var(--min-item-height)/2 - var(--base-size-12)/2);color:var(--fgColor-muted);grid-area:toggle;justify-content:center;align-items:flex-start;cursor:pointer}.TreeViewRootUlStyles .TreeViewItemToggleHover:hover{background-color:var(--control-transparent-bgColor-hover)}.TreeViewRootUlStyles .TreeViewItemToggleEnd{border-top-left-radius:var(--borderRadius-medium);border-bottom-left-radius:var(--borderRadius-medium)}.TreeViewRootUlStyles :is(a.TreeViewItemContent:hover,button.TreeViewItemContent:hover){-webkit-text-decoration:underline;text-decoration:underline;text-decoration-color:var(--control-fgColor-rest)}.TreeViewRootUlStyles :has(.TreeViewItemContent[aria-disabled=true]){cursor:not-allowed}.TreeViewRootUlStyles .TreeViewItemContent{display:flex;align-items:center;height:100%;padding:0 var(--base-size-8);outline:none;cursor:pointer;padding-top:calc((var(--min-item-height) - var(--custom-line-height, 1.3rem))/2);padding-bottom:calc((var(--min-item-height) - var(--custom-line-height, 1.3rem))/2);line-height:var(--custom-line-height,var(--text-body-lineHeight-medium,1.4285));grid-area:content;gap:var(--stack-gap-condensed)}.TreeViewRootUlStyles .TreeViewItemContent,:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemCheckbox{text-align:left;-webkit-user-select:none;user-select:none;background-color:initial;border:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent}:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemCheckbox{position:relative;color:var(--control-fgColor-rest);border-radius:var(--borderRadius-medium);transition:background 33.333ms linear}[aria-checked=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .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([aria-checked=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .FormControl-checkbox):before{visibility:visible;transition:visibility 0s linear 0s;animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards}[aria-checked=false]:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItem-singleSelectCheckmark{visibility:hidden}[aria-checked=mixed]:is(.TreeViewRootUlStyles .TreeViewItemContent) .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([aria-checked=mixed]:is(.TreeViewRootUlStyles .TreeViewItemContent) .FormControl-checkbox):before{visibility:visible;mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIyIiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMTAgMiI+PHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMCAxYTEgMSAwIDAgMSAxLTFoOGExIDEgMCAxIDEgMCAySDFhMSAxIDAgMCAxLTEtMSIgY2xpcC1ydWxlPSJldmVub2RkIi8+PC9zdmc+");animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards;clip-path:none}[aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent){pointer-events:none}[aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemContentText{color:var(--control-fgColor-disabled)}:is([aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemVisual) svg,[aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .TreeViewItemVisual{fill:var(--control-fgColor-disabled)}@media (hover:hover){:is([aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent) .FormControl-checkbox):hover{cursor:not-allowed}[aria-disabled=true]:is(.TreeViewRootUlStyles .TreeViewItemContent):hover{cursor:not-allowed;background-color:initial}}.TreeViewRootUlStyles .TreeViewItemContentText{color:var(--control-fgColor-rest);flex:1 1 auto;width:0}.TreeViewRootUlStyles:where([data-truncate-text=true]) .TreeViewItemContentText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.TreeViewRootUlStyles:where([data-truncate-text=false]) .TreeViewItemContentText{word-break:break-word}.TreeViewRootUlStyles .TreeViewItemVisual{display:flex;align-self:flex-start;height:var(--custom-line-height,1.3rem);color:var(--fgColor-muted);align-items:center}.TreeViewRootUlStyles .TreeViewItemLeadingAction{grid-area:leadingAction}.TreeViewRootUlStyles .TreeViewItemTrailingAction{grid-area:trailingAction}.TreeViewRootUlStyles :is(.TreeViewItemLeadingAction,.TreeViewItemTrailingAction){display:flex;color:var(--fgColor-muted);padding-top:calc(var(--min-item-height)/2 - var(--custom-line-height, 1.3rem)/2 - 6px);padding-bottom:calc(var(--min-item-height)/2 - var(--custom-line-height, 1.3rem)/2 - 6px)}:is(.TreeViewRootUlStyles .TreeViewItemTrailingAction,.TreeViewRootUlStyles .TreeViewItemLeadingAction)>button{flex-shrink:1}.TreeViewRootUlStyles .TreeViewItemLevelLine{width:100%;height:100%;border-color:var(--borderColor-muted);border-right:var(--borderWidth-thin) solid}@media (hover:hover){.TreeViewRootUlStyles .TreeViewItemLevelLine{border-color:#0000}.TreeViewRootUlStyles:focus-within .TreeViewItemLevelLine,.TreeViewRootUlStyles:hover .TreeViewItemLevelLine{border-color:var(--borderColor-muted)}}.TreeViewRootUlStyles .TreeViewVisuallyHidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.TreeViewSkeletonItemContainerStyle{display:flex;align-items:center;column-gap:.5rem;height:2rem}@media (pointer:coarse){.TreeViewSkeletonItemContainerStyle{height:2.75rem}}.TreeViewSkeletonItemContainerStyle:nth-of-type(5n+1){--tree-item-loading-width:67%}.TreeViewSkeletonItemContainerStyle:nth-of-type(5n+2){--tree-item-loading-width:47%}.TreeViewSkeletonItemContainerStyle:nth-of-type(5n+3){--tree-item-loading-width:73%}.TreeViewSkeletonItemContainerStyle:nth-of-type(5n+4){--tree-item-loading-width:64%}.TreeViewSkeletonItemContainerStyle:nth-of-type(5n+5){--tree-item-loading-width:50%}.TreeItemSkeletonTextStyles{width:var(--tree-item-loading-width,67%)}.TreeViewFailureMessage{display:grid;grid-template-columns:auto 1fr;gap:.5rem;width:100%;align-items:center}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tree_view.pcss"],"names":[],"mappings":"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","file":"tree_view.css","sourcesContent":["/* stylelint-disable selector-max-type -- Copied from primer/react */\n\n.TreeViewRootUlStyles {\n padding: 0;\n margin: 0;\n list-style: none;\n\n /*\n * WARNING: This is a performance optimization.\n *\n * We define styles for the tree items at the root level of the tree\n * to avoid recomputing the styles for each item when the tree updates.\n * We're sacrificing maintainability for performance because TreeView\n * needs to be performant enough to handle large trees (thousands of items).\n *\n * This is intended to be a temporary solution until we can improve the\n * performance of our styling patterns.\n *\n * Do NOT copy this pattern without understanding the tradeoffs.\n */\n & .TreeViewItem {\n outline: none;\n\n &:focus-visible > div {\n box-shadow: var(--boxShadow-thick) var(--fgColor-accent);\n\n @media (forced-colors: active) {\n outline: 2px solid HighlightText;\n /* stylelint-disable-next-line declaration-property-value-no-unknown -- Copied from primer/react */\n outline-offset: -2;\n }\n }\n }\n\n & .TreeViewItemContainer {\n --level: 1;\n --toggle-width: 1rem;\n --min-item-height: 2rem;\n\n position: relative;\n display: grid;\n width: 100%;\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-default);\n border-radius: var(--borderRadius-medium);\n grid-template-columns: var(--spacer-width) var(--leading-action-width) var(--toggle-width) 1fr var(--trailing-action-width);\n grid-template-areas: 'spacer leadingAction toggle content trailingAction';\n\n --leading-action-width: calc(var(--has-leading-action, 0) * 1.5rem);\n --trailing-action-width: calc(var(--has-trailing-action, 0) * 1.5rem);\n --spacer-width: calc(calc(var(--level) - 1) * (var(--toggle-width) / 2));\n\n &:has([data-has-leading-action]) {\n --has-leading-action: 1;\n }\n\n &:has([data-has-trailing-action]) {\n --has-trailing-action: 1;\n }\n\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: -2px;\n }\n }\n\n @media (pointer: coarse) {\n --toggle-width: 1.5rem;\n --min-item-height: 2.75rem;\n }\n\n &:has(.TreeViewFailureMessage):hover {\n cursor: default;\n background-color: transparent;\n\n @media (forced-colors: active) {\n outline: none;\n }\n }\n\n &:has([role='treeitem']:focus-visible) {\n box-shadow: var(--boxShadow-thick) var(--fgColor-accent);\n }\n }\n\n &:where([data-omit-spacer='true']) .TreeViewItemContainer {\n grid-template-columns: 0 0 0 1fr;\n }\n\n /* stylelint-disable-next-line selector-max-specificity */\n & .TreeViewItem > .TreeViewItemContainer:has(.TreeViewItemContent[aria-current='true']) {\n background-color: var(--control-transparent-bgColor-selected);\n\n /* Current item indicator */\n /* stylelint-disable-next-line selector-max-specificity -- Copied from primer/react */\n &::after {\n position: absolute;\n top: calc(50% - var(--base-size-12));\n left: calc(-1 * var(--base-size-8));\n width: 0.25rem;\n height: 1.5rem;\n content: '';\n\n /*\n * Use fgColor accent for consistency across all themes. Using the \"correct\" variable,\n * --bgColor-accent-emphasis, causes vrt failures for dark high contrast mode\n */\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-accent);\n border-radius: var(--borderRadius-medium);\n\n @media (forced-colors: active) {\n background-color: HighlightText;\n }\n }\n }\n\n & .TreeViewItemToggle {\n display: flex;\n height: 100%;\n\n /* The toggle should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc(var(--min-item-height) / 2 - var(--base-size-12) / 2);\n color: var(--fgColor-muted);\n grid-area: toggle;\n justify-content: center;\n align-items: flex-start;\n cursor: pointer;\n }\n\n & .TreeViewItemToggleHover:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n\n & .TreeViewItemToggleEnd {\n border-top-left-radius: var(--borderRadius-medium);\n border-bottom-left-radius: var(--borderRadius-medium);\n }\n\n /* stylelint-disable-next-line selector-no-qualifying-type */\n & a.TreeViewItemContent:hover, button.TreeViewItemContent:hover {\n text-decoration: underline;\n text-decoration-color: var(--control-fgColor-rest);\n }\n\n & :has(.TreeViewItemContent[aria-disabled=\"true\"]) {\n cursor: not-allowed;\n }\n\n & .TreeViewItemContent {\n display: flex;\n align-items: center;\n height: 100%;\n padding: 0 var(--base-size-8);\n outline: none;\n text-align: left;\n user-select: none;\n background-color: transparent;\n border: none;\n touch-action: manipulation;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n\n /* The dynamic top and bottom padding to maintain the minimum item height for single line items */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n line-height: var(--custom-line-height, var(--text-body-lineHeight-medium, 1.4285));\n grid-area: content;\n gap: var(--stack-gap-condensed);\n\n & .TreeViewItemCheckbox {\n position: relative;\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 }\n\n &[aria-checked='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 /* stylelint-disable-next-line max-nesting-depth, selector-max-specificity -- Copied from primer/react */\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\n &[aria-checked='false'] {\n /* singleselect checkmark */\n & .TreeViewItem-singleSelectCheckmark {\n visibility: hidden;\n }\n }\n\n &[aria-checked='mixed'] {\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 /* stylelint-disable-next-line max-nesting-depth, selector-max-specificity -- Copied from primer/react */\n &::before {\n visibility: visible;\n mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgdmlld0JveD0iMCAwIDEwIDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCAxQzAgMC40NDc3MTUgMC40NDc3MTUgMCAxIDBIOUM5LjU1MjI5IDAgMTAgMC40NDc3MTUgMTAgMUMxMCAxLjU1MjI4IDkuNTUyMjkgMiA5IDJIMUMwLjQ0NzcxNSAyIDAgMS41NTIyOCAwIDFaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');\n animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;\n clip-path: none;\n }\n }\n }\n\n &[aria-disabled='true'] {\n pointer-events: none;\n\n & .TreeViewItemContentText {\n color: var(--control-fgColor-disabled);\n }\n\n & .TreeViewItemVisual {\n fill: var(--control-fgColor-disabled);\n\n /* stylelint-disable-next-line max-nesting-depth, selector-max-compound-selectors, selector-max-specificity */\n & svg {\n fill: var(--control-fgColor-disabled);\n }\n }\n\n & .FormControl-checkbox {\n /* stylelint-disable-next-line max-nesting-depth */\n @media (hover: hover) {\n /* stylelint-disable-next-line max-nesting-depth, selector-max-specificity */\n &:hover {\n cursor: not-allowed;\n }\n }\n }\n\n @media (hover: hover) {\n /* stylelint-disable-next-line max-nesting-depth */\n &:hover {\n cursor: not-allowed;\n background-color: transparent;\n }\n }\n }\n }\n\n & .TreeViewItemContentText {\n color: var(--control-fgColor-rest);\n flex: 1 1 auto;\n width: 0;\n }\n\n &:where([data-truncate-text='true']) .TreeViewItemContentText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &:where([data-truncate-text='false']) .TreeViewItemContentText {\n /* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Copied from primer/react */\n word-break: break-word;\n }\n\n & .TreeViewItemVisual {\n display: flex;\n\n /* The visual icons should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n align-self: baseline;\n height: var(--custom-line-height, 1.3rem);\n color: var(--fgColor-muted);\n align-items: center;\n }\n\n & .TreeViewItemLeadingAction {\n grid-area: leadingAction;\n }\n\n & .TreeViewItemTrailingAction {\n grid-area: trailingAction;\n }\n\n & .TreeViewItemTrailingAction,\n & .TreeViewItemLeadingAction {\n display: flex;\n color: var(--fgColor-muted);\n /* The dynamic top and bottom padding to maintain the minimum item height for single line items while cancelling out the invisible area of the button */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem) - 12px) / 2);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem) - 12px) / 2);\n\n & > button {\n flex-shrink: 1;\n }\n }\n\n & .TreeViewItemLevelLine {\n width: 100%;\n height: 100%;\n\n /*\n * On devices without hover, the nesting indicator lines\n * appear at all times.\n */\n border-color: var(--borderColor-muted);\n border-right: var(--borderWidth-thin) solid;\n }\n\n /*\n * On devices with :hover support, the nesting indicator lines\n * fade in when the user mouses over the entire component,\n * or when there's focus inside the component. This makes\n * sure the component remains simple when not in use.\n */\n @media (hover: hover) {\n .TreeViewItemLevelLine {\n border-color: transparent;\n }\n\n &:hover .TreeViewItemLevelLine,\n &:focus-within .TreeViewItemLevelLine {\n border-color: var(--borderColor-muted);\n }\n }\n\n & .TreeViewVisuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin: -1px;\n overflow: hidden;\n /* stylelint-disable-next-line property-no-deprecated -- `clip` is the widely-supported visually-hidden idiom; kept for older-browser screen-reader support */\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n}\n\n.TreeViewSkeletonItemContainerStyle {\n display: flex;\n align-items: center;\n column-gap: 0.5rem;\n height: 2rem;\n\n @media (pointer: coarse) {\n height: 2.75rem;\n }\n\n &:nth-of-type(5n + 1) {\n --tree-item-loading-width: 67%;\n }\n\n &:nth-of-type(5n + 2) {\n --tree-item-loading-width: 47%;\n }\n\n &:nth-of-type(5n + 3) {\n --tree-item-loading-width: 73%;\n }\n\n &:nth-of-type(5n + 4) {\n --tree-item-loading-width: 64%;\n }\n\n &:nth-of-type(5n + 5) {\n --tree-item-loading-width: 50%;\n }\n}\n\n.TreeItemSkeletonTextStyles {\n width: var(--tree-item-loading-width, 67%);\n}\n\n.TreeViewFailureMessage {\n display: grid;\n grid-template-columns: auto 1fr;\n gap: 0.5rem;\n width: 100%;\n align-items: center;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["tree_view.pcss"],"names":[],"mappings":"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","file":"tree_view.css","sourcesContent":["/* stylelint-disable selector-max-type -- Copied from primer/react */\n\n.TreeViewRootUlStyles {\n padding: 0;\n margin: 0;\n list-style: none;\n\n /*\n * WARNING: This is a performance optimization.\n *\n * We define styles for the tree items at the root level of the tree\n * to avoid recomputing the styles for each item when the tree updates.\n * We're sacrificing maintainability for performance because TreeView\n * needs to be performant enough to handle large trees (thousands of items).\n *\n * This is intended to be a temporary solution until we can improve the\n * performance of our styling patterns.\n *\n * Do NOT copy this pattern without understanding the tradeoffs.\n */\n & .TreeViewItem {\n outline: none;\n\n &:focus-visible > div {\n box-shadow: var(--boxShadow-thick) var(--fgColor-accent);\n\n @media (forced-colors: active) {\n outline: 2px solid HighlightText;\n /* stylelint-disable-next-line declaration-property-value-no-unknown -- Copied from primer/react */\n outline-offset: -2;\n }\n }\n }\n\n & .TreeViewItemContainer {\n --level: 1;\n --toggle-width: 1rem;\n --min-item-height: 2rem;\n\n position: relative;\n display: grid;\n width: 100%;\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-default);\n border-radius: var(--borderRadius-medium);\n grid-template-columns: var(--spacer-width) var(--leading-action-width) var(--toggle-width) 1fr var(--trailing-action-width);\n grid-template-areas: 'spacer leadingAction toggle content trailingAction';\n\n --leading-action-width: calc(var(--has-leading-action, 0) * 1.5rem);\n --trailing-action-width: calc(var(--has-trailing-action, 0) * 1.5rem);\n --spacer-width: calc(calc(var(--level) - 1) * (var(--toggle-width) / 2));\n\n &:has([data-has-leading-action]) {\n --has-leading-action: 1;\n }\n\n &:has([data-has-trailing-action]) {\n --has-trailing-action: 1;\n }\n\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: -2px;\n }\n }\n\n @media (pointer: coarse) {\n --toggle-width: 1.5rem;\n --min-item-height: 2.75rem;\n }\n\n &:has(.TreeViewFailureMessage):hover {\n cursor: default;\n background-color: transparent;\n\n @media (forced-colors: active) {\n outline: none;\n }\n }\n\n &:has([role='treeitem']:focus-visible) {\n box-shadow: var(--boxShadow-thick) var(--fgColor-accent);\n }\n }\n\n &:where([data-omit-spacer='true']) .TreeViewItemContainer {\n grid-template-columns: 0 0 0 1fr;\n }\n\n /* stylelint-disable-next-line selector-max-specificity */\n & .TreeViewItem > .TreeViewItemContainer:has(.TreeViewItemContent[aria-current='true']) {\n background-color: var(--control-transparent-bgColor-selected);\n\n /* Current item indicator */\n /* stylelint-disable-next-line selector-max-specificity -- Copied from primer/react */\n &::after {\n position: absolute;\n top: calc(50% - var(--base-size-12));\n left: calc(-1 * var(--base-size-8));\n width: 0.25rem;\n height: 1.5rem;\n content: '';\n\n /*\n * Use fgColor accent for consistency across all themes. Using the \"correct\" variable,\n * --bgColor-accent-emphasis, causes vrt failures for dark high contrast mode\n */\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-accent);\n border-radius: var(--borderRadius-medium);\n\n @media (forced-colors: active) {\n background-color: HighlightText;\n }\n }\n }\n\n & .TreeViewItemToggle {\n display: flex;\n height: 100%;\n\n /* The toggle should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc(var(--min-item-height) / 2 - var(--base-size-12) / 2);\n color: var(--fgColor-muted);\n grid-area: toggle;\n justify-content: center;\n align-items: flex-start;\n cursor: pointer;\n }\n\n & .TreeViewItemToggleHover:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n\n & .TreeViewItemToggleEnd {\n border-top-left-radius: var(--borderRadius-medium);\n border-bottom-left-radius: var(--borderRadius-medium);\n }\n\n /* stylelint-disable-next-line selector-no-qualifying-type */\n & a.TreeViewItemContent:hover, button.TreeViewItemContent:hover {\n text-decoration: underline;\n text-decoration-color: var(--control-fgColor-rest);\n }\n\n & :has(.TreeViewItemContent[aria-disabled=\"true\"]) {\n cursor: not-allowed;\n }\n\n & .TreeViewItemContent {\n display: flex;\n align-items: center;\n height: 100%;\n padding: 0 var(--base-size-8);\n outline: none;\n text-align: left;\n user-select: none;\n background-color: transparent;\n border: none;\n touch-action: manipulation;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n\n /* The dynamic top and bottom padding to maintain the minimum item height for single line items */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n line-height: var(--custom-line-height, var(--text-body-lineHeight-medium, 1.4285));\n grid-area: content;\n gap: var(--stack-gap-condensed);\n\n & .TreeViewItemCheckbox {\n position: relative;\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 }\n\n &[aria-checked='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 /* stylelint-disable-next-line max-nesting-depth, selector-max-specificity -- Copied from primer/react */\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\n &[aria-checked='false'] {\n /* singleselect checkmark */\n & .TreeViewItem-singleSelectCheckmark {\n visibility: hidden;\n }\n }\n\n &[aria-checked='mixed'] {\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 /* stylelint-disable-next-line max-nesting-depth, selector-max-specificity -- Copied from primer/react */\n &::before {\n visibility: visible;\n mask-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMiIgdmlld0JveD0iMCAwIDEwIDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMCAxQzAgMC40NDc3MTUgMC40NDc3MTUgMCAxIDBIOUM5LjU1MjI5IDAgMTAgMC40NDc3MTUgMTAgMUMxMCAxLjU1MjI4IDkuNTUyMjkgMiA5IDJIMUMwLjQ0NzcxNSAyIDAgMS41NTIyOCAwIDFaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');\n animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;\n clip-path: none;\n }\n }\n }\n\n &[aria-disabled='true'] {\n pointer-events: none;\n\n & .TreeViewItemContentText {\n color: var(--control-fgColor-disabled);\n }\n\n & .TreeViewItemVisual {\n fill: var(--control-fgColor-disabled);\n\n /* stylelint-disable-next-line max-nesting-depth, selector-max-compound-selectors, selector-max-specificity */\n & svg {\n fill: var(--control-fgColor-disabled);\n }\n }\n\n & .FormControl-checkbox {\n /* stylelint-disable-next-line max-nesting-depth */\n @media (hover: hover) {\n /* stylelint-disable-next-line max-nesting-depth, selector-max-specificity */\n &:hover {\n cursor: not-allowed;\n }\n }\n }\n\n @media (hover: hover) {\n /* stylelint-disable-next-line max-nesting-depth */\n &:hover {\n cursor: not-allowed;\n background-color: transparent;\n }\n }\n }\n }\n\n & .TreeViewItemContentText {\n color: var(--control-fgColor-rest);\n flex: 1 1 auto;\n width: 0;\n }\n\n &:where([data-truncate-text='true']) .TreeViewItemContentText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &:where([data-truncate-text='false']) .TreeViewItemContentText {\n /* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Copied from primer/react */\n word-break: break-word;\n }\n\n & .TreeViewItemVisual {\n display: flex;\n\n /* The visual icons should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n align-self: flex-start;\n height: var(--custom-line-height, 1.3rem);\n color: var(--fgColor-muted);\n align-items: center;\n }\n\n & .TreeViewItemLeadingAction {\n grid-area: leadingAction;\n }\n\n & .TreeViewItemTrailingAction {\n grid-area: trailingAction;\n }\n\n & .TreeViewItemTrailingAction,\n & .TreeViewItemLeadingAction {\n display: flex;\n color: var(--fgColor-muted);\n /* The dynamic top and bottom padding to maintain the minimum item height for single line items while cancelling out the invisible area of the button */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem) - 12px) / 2);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem) - 12px) / 2);\n\n & > button {\n flex-shrink: 1;\n }\n }\n\n & .TreeViewItemLevelLine {\n width: 100%;\n height: 100%;\n\n /*\n * On devices without hover, the nesting indicator lines\n * appear at all times.\n */\n border-color: var(--borderColor-muted);\n border-right: var(--borderWidth-thin) solid;\n }\n\n /*\n * On devices with :hover support, the nesting indicator lines\n * fade in when the user mouses over the entire component,\n * or when there's focus inside the component. This makes\n * sure the component remains simple when not in use.\n */\n @media (hover: hover) {\n .TreeViewItemLevelLine {\n border-color: transparent;\n }\n\n &:hover .TreeViewItemLevelLine,\n &:focus-within .TreeViewItemLevelLine {\n border-color: var(--borderColor-muted);\n }\n }\n\n & .TreeViewVisuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin: -1px;\n overflow: hidden;\n /* stylelint-disable-next-line property-no-deprecated -- `clip` is the widely-supported visually-hidden idiom; kept for older-browser screen-reader support */\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n}\n\n.TreeViewSkeletonItemContainerStyle {\n display: flex;\n align-items: center;\n column-gap: 0.5rem;\n height: 2rem;\n\n @media (pointer: coarse) {\n height: 2.75rem;\n }\n\n &:nth-of-type(5n + 1) {\n --tree-item-loading-width: 67%;\n }\n\n &:nth-of-type(5n + 2) {\n --tree-item-loading-width: 47%;\n }\n\n &:nth-of-type(5n + 3) {\n --tree-item-loading-width: 73%;\n }\n\n &:nth-of-type(5n + 4) {\n --tree-item-loading-width: 64%;\n }\n\n &:nth-of-type(5n + 5) {\n --tree-item-loading-width: 50%;\n }\n}\n\n.TreeItemSkeletonTextStyles {\n width: var(--tree-item-loading-width, 67%);\n}\n\n.TreeViewFailureMessage {\n display: grid;\n grid-template-columns: auto 1fr;\n gap: 0.5rem;\n width: 100%;\n align-items: center;\n}\n"]}
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
|
|
285
285
|
/* The visual icons should appear vertically centered for single-line items, but remain at the top for items that wrap
|
|
286
286
|
across more lines. */
|
|
287
|
-
align-self:
|
|
287
|
+
align-self: flex-start;
|
|
288
288
|
height: var(--custom-line-height, 1.3rem);
|
|
289
289
|
color: var(--fgColor-muted);
|
|
290
290
|
align-items: center;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollapsibleElement } from '../collapsible';
|
|
2
|
-
declare class CollapsibleHeaderElement extends CollapsibleElement {
|
|
2
|
+
export declare class CollapsibleHeaderElement extends CollapsibleElement {
|
|
3
3
|
connectedCallback(): void;
|
|
4
4
|
get baseClass(): string;
|
|
5
5
|
}
|
|
@@ -8,4 +8,3 @@ declare global {
|
|
|
8
8
|
CollapsibleHeaderElement: typeof CollapsibleHeaderElement;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
export {};
|
|
@@ -2,7 +2,7 @@ import {controller} from '@github/catalyst'
|
|
|
2
2
|
import {CollapsibleElement} from '../collapsible'
|
|
3
3
|
|
|
4
4
|
@controller('collapsible-header')
|
|
5
|
-
class CollapsibleHeaderElement extends CollapsibleElement {
|
|
5
|
+
export class CollapsibleHeaderElement extends CollapsibleElement {
|
|
6
6
|
connectedCallback() {
|
|
7
7
|
if (!this.closest('.Box')) {
|
|
8
8
|
throw new Error('No surrounding BorderBox found')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollapsibleElement } from './collapsible';
|
|
2
|
-
declare class CollapsibleSectionElement extends CollapsibleElement {
|
|
2
|
+
export declare class CollapsibleSectionElement extends CollapsibleElement {
|
|
3
3
|
get baseClass(): string;
|
|
4
4
|
}
|
|
5
5
|
declare global {
|
|
@@ -7,4 +7,3 @@ declare global {
|
|
|
7
7
|
CollapsibleSectionElement: typeof CollapsibleSectionElement;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
export {};
|
|
@@ -2,7 +2,7 @@ import {controller} from '@github/catalyst'
|
|
|
2
2
|
import {CollapsibleElement} from './collapsible'
|
|
3
3
|
|
|
4
4
|
@controller('collapsible-section')
|
|
5
|
-
class CollapsibleSectionElement extends CollapsibleElement {
|
|
5
|
+
export class CollapsibleSectionElement extends CollapsibleElement {
|
|
6
6
|
get baseClass(): string {
|
|
7
7
|
return 'CollapsibleSection'
|
|
8
8
|
}
|
|
@@ -6,7 +6,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { controller, target } from '@github/catalyst';
|
|
8
8
|
let ZenModeButtonElement = class ZenModeButtonElement extends HTMLElement {
|
|
9
|
-
// eslint-disable-next-line custom-elements/no-constructor
|
|
10
9
|
constructor() {
|
|
11
10
|
super();
|
|
12
11
|
this.inZenMode = false;
|
|
@@ -5,7 +5,6 @@ class ZenModeButtonElement extends HTMLElement {
|
|
|
5
5
|
@target button: HTMLElement
|
|
6
6
|
inZenMode = false
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line custom-elements/no-constructor
|
|
9
8
|
constructor() {
|
|
10
9
|
super()
|
|
11
10
|
document.addEventListener('fullscreenchange', this.fullscreenChangeEventHandler.bind(this))
|
|
@@ -13,9 +13,13 @@
|
|
|
13
13
|
<%= builder.text_field(@input.name, **@input.input_arguments) %>
|
|
14
14
|
<% end %>
|
|
15
15
|
<% if @input.show_clear_button? %>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
<%= render(Primer::Beta::IconButton.new(size: :small,
|
|
17
|
+
scheme: :invisible,
|
|
18
|
+
icon: :"x-circle-fill",
|
|
19
|
+
"aria-label": @input.clear_button_label || I18n.t(:button_clear),
|
|
20
|
+
id: @input.clear_button_id,
|
|
21
|
+
classes: "FormControl-input-trailingAction",
|
|
22
|
+
data: { action: "click:primer-text-field#clearContents" })) %>
|
|
19
23
|
<% end %>
|
|
20
24
|
<% if @input.trailing_visual %>
|
|
21
25
|
<div class="FormControl-input-trailingVisualWrap">
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<% icons.with_collapsed_icon(icon: :"file-directory-fill", color: :accent) %>
|
|
6
6
|
<% end %>
|
|
7
7
|
|
|
8
|
-
<% sub_tree.with_sub_tree(label: "action_menu", expanded:
|
|
8
|
+
<% sub_tree.with_sub_tree(label: "action_menu", expanded: nested_children_expanded, select_variant: select_variant, select_strategy: :self) do |sub_tree| %>
|
|
9
9
|
<% sub_tree.with_leading_visual_icons do |icons| %>
|
|
10
10
|
<% icons.with_expanded_icon(icon: :"file-directory-open-fill", color: :accent) %>
|
|
11
11
|
<% icons.with_collapsed_icon(icon: :"file-directory-fill", color: :accent) %>
|