@devtools-ds/tree
Version:
A versatile expanding `Tree` component, with full keyboard navigation following the [Tree View Design Pattern](https://www.w3.org/TR/wai-aria-practices/examples/treeview/treeview-2/treeview-2a.html).
1 lines • 2.15 kB
Source Map (JSON)
{"version":3,"sources":["../src/Tree.css","<no source>"],"names":[],"mappings":"AAAA;EACE,WAAW;EACX,6BAA6B;AAC/B;;AAEA,gCAAgC;AAChC;EACE,6BAA6B;AAC/B;;AAEA,2CAA2C;AAC3C;EACE,SAAS;EACT,UAAU;EACV,6BAA6B;AAiC/B;AA/BE,8DAA8D;AAC9D;IACE,eAAe;IACf,gBAAgB;IAChB,WAAW;IACX,qBAAqB;IACrB,aAAa;IACb,iBAAiB;EAgBnB;AAdE;MACE,4CAAmC;MACnC,uCAA4B;IAW9B;AARI;UACE,YAAY;QACd;AAEA;UACE,uDAAuD;QACzD;AAMJ;MACE,4CAAmC;MACnC,sCAAiC;IACnC;;AAIJ,wCAAwC;AACxC;EACE,uBAAuB;EACvB,qBAAqB;EACrB,QAAQ;EACR,SAAS;EACT,mBAAmB;EACnB,iCAAiC;EACjC,4EAAmE;EACnE,wBAAwB;AAU1B;AARE;IACE,yBAAyB;IACzB,eAAe;EACjB;AAEA;AAfF;IAgBI;AAEJ;EADE;ACnEF;EAAA,sBAAA;EAAA,sBAAA;EAAA;CAAA;AAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA;CAAA;AAAA;EAAA,sBAAA;EAAA,sBAAA;EAAA;CAAA","file":"Tree.css","sourcesContent":[".tree {\n width: 100%;\n font-family: Menlo, monospace;\n}\n\n/* Indent each row in the tree */\n.item {\n list-style: outside none none;\n}\n\n/* Remove padding from the unordered list */\n.group {\n margin: 0;\n padding: 0;\n list-style: outside none none;\n\n /* Responsible for the highlight and focus colors in the row */\n .label {\n cursor: default;\n line-height: 1.5;\n width: 100%;\n display: inline-block;\n outline: none;\n padding-left: 5px;\n\n &:focus {\n background-color: @theme focusColor;\n color: @theme focusTextColor;\n\n &.focusWhite {\n * {\n color: white;\n }\n\n .arrow {\n border-color: transparent transparent transparent white;\n }\n }\n }\n }\n\n .label.hover {\n &:hover:not(:focus) {\n background-color: @theme hoverColor;\n border-radius: @theme hoverRadius;\n }\n }\n}\n\n/* The expand/collapse arrow character */\n.arrow {\n margin: 0 0.7em 0 0.1em;\n display: inline-block;\n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0.4em 0 0.4em 0.4em;\n border-color: transparent transparent transparent @theme arrowColor;\n vertical-align: baseline;\n\n &.open {\n transform: rotateZ(90deg);\n bottom: -0.05em;\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n}\n",null]}