// Auto-generated by: pnpm test:stylesheets:update import { join } from 'node:path'; import { compileLessWithTokens } from '../../../scripts/testStylesheets/compileLessWithTokens'; import { DEFAULT_LESS_PRELUDES, DEFAULT_TOKEN_CSS_FILES } from '../../../scripts/testStylesheets/config'; describe('components/Tree/Tree.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'Tree.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .v2Tree { display: flex; flex-direction: column; gap: 24px; } .v2Tree__listContainer { overflow-x: auto; padding-top: 1px; padding-bottom: 1px; } .v2Tree__list { --checkbox-width: 0px; --drag-handle-width: 0px; display: flex; flex-direction: column; width: max-content; min-width: 100%; } .v2Tree__list[data-selection-mode='multiple'] { --checkbox-width: 22px; } .v2Tree__list[data-allows-dragging='true'] { --drag-handle-width: 26px; } .v2Tree__list .v2Tree__dropIndicator[data-drop-target='true'] { margin-left: calc((var(--tree-item-level) - 1) * (24px + 2px) + var(--checkbox-width) + var(--drag-handle-width)); outline: 1px solid oklch(0.7247 0.1478 233.0429); } .v2Tree__listItem { display: flex; flex-direction: row; align-items: center; padding-top: 8px; padding-bottom: 8px; background-color: oklch(1 0 none); outline: none; } .v2Tree__listItem[data-focus-visible='true'], .v2Tree__listItem:focus-within, .v2Tree__listItem:hover { background-color: oklch(0.8761 0 none); } .v2Tree__listItem[aria-expanded] { cursor: pointer; } .v2Tree__listItem[data-drop-target='true'] { box-shadow: inset 0 0 0 1px oklch(0.7247 0.1478 233.0429); } .v2Tree__listItem[data-dragging='true'] { background-color: oklch(0.4991 0.002 247.8639 / 0.102); } .v2Tree__listItem[data-dragging='true'] * { opacity: 0.6; } .v2Tree__listItem .checkboxField { margin-top: 0; } @media only screen and (min-width: 768px) { .v2Tree__listItem { padding-top: 4px; padding-bottom: 4px; } } .v2Tree__listItemSpacer { flex-shrink: 0; width: calc(24px + 2px); } .v2Tree__listItemIndent { flex-shrink: 0; width: calc((var(--tree-item-level) - 1) * (24px + 2px)); } .v2Tree__listItemLabel { margin: 0; padding: 4px; } .v2Tree__listItemDescription { margin: 0; padding: 4px; } .v2Tree__listItemActions { display: flex; flex-direction: row; gap: 4px; margin-left: auto; padding-right: 4px; padding-left: 4px; opacity: 0; } .v2Tree__listItemActions.v2Tree__listItemActions--alwaysVisible, .v2Tree__listItem:hover .v2Tree__listItemActions, .v2Tree__listItem[data-focus-visible='true'] .v2Tree__listItemActions, .v2Tree__listItem:focus-within .v2Tree__listItemActions { opacity: 1; } `); }); });