// 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/ReorderableListing/ReorderableListing.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'ReorderableListing.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .reorderableListing { display: flex; flex-direction: column; gap: 12px; background: transparent; } .reorderableListing__list { display: flex; flex-direction: column; /* Breathing room for the 1px drop-indicator outline at the first/last gap. */ padding-top: 1px; padding-bottom: 1px; } .reorderableListing__row { display: flex; flex-direction: column; outline: none; } .reorderableListing__dropIndicator[data-drop-target='true'] { outline: 1px solid oklch(0.7247 0.1478 233.0429); } .reorderableListing__item { display: flex; flex-direction: row; gap: 12px; align-items: center; height: 48px; padding-top: 8px; padding-right: 8px; padding-bottom: 8px; background-color: transparent; } .reorderableListing__row:hover .reorderableListing__item, .reorderableListing__row[data-focus-visible='true'] .reorderableListing__item, .reorderableListing__row:focus-within .reorderableListing__item { background-color: oklch(0.8761 0 none); } .reorderableListing__item--subitem { padding-left: 16px; } .reorderableListing__item--hover { background-color: oklch(0.8761 0 none); } .reorderableListing__item--dragging, .reorderableListing__row[data-dragging='true'] .reorderableListing__item { background-color: oklch(0.8749 0.0739 232.8465); } .reorderableListing__item--disabled .reorderableListing__labelText, .reorderableListing__item--hidden .reorderableListing__labelText, .reorderableListing__item--disabled .reorderableListing__icon, .reorderableListing__item--hidden .reorderableListing__icon, .reorderableListing__item--disabled .reorderableListing__handle, .reorderableListing__item--hidden .reorderableListing__handle { color: oklch(0.7252 0 none); } .reorderableListing__item--hidden .reorderableListing__actions .iconButton { color: oklch(0.7252 0 none); } .reorderableListing__item--hidden .reorderableListing__actions .iconButton:hover { color: oklch(0 0 none); } .reorderableListing__handle { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 24px; height: 24px; color: oklch(0 0 none); } .reorderableListing__dragHandle { cursor: grab; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; color: inherit; background: none; border: none; outline: none; } .reorderableListing__dragHandle[data-focus-visible='true'] { outline: 2px solid oklch(0.7247 0.1478 233.0429); outline-offset: 2px; } .reorderableListing__dragHandle[data-dragging='true'] { cursor: grabbing; } .reorderableListing__dragHandle:disabled { cursor: default; color: oklch(0.7252 0 none); } .reorderableListing__marker { transform: translateY(-3px); color: oklch(0.7252 0 none); } .reorderableListing__label { overflow: hidden; display: flex; flex: 1 0 0; gap: 12px; align-items: center; min-width: 0; height: 100%; } .reorderableListing__icon { flex-shrink: 0; } .reorderableListing__media { display: flex; flex-shrink: 0; align-items: center; } .reorderableListing__labelText { overflow: hidden; flex: 1 0 0; min-width: 0; font-family: 'Inter', 'Arial', sans-serif; font-size: 14px; line-height: 22px; text-overflow: ellipsis; letter-spacing: 0.16px; white-space: nowrap; } .reorderableListing__actions { pointer-events: none; display: flex; flex-shrink: 0; gap: 8px; align-items: center; margin-left: auto; opacity: 0; } .reorderableListing__row:hover .reorderableListing__actions, .reorderableListing__row[data-focus-visible='true'] .reorderableListing__actions, .reorderableListing__row:focus-within .reorderableListing__actions { pointer-events: auto; opacity: 1; } .reorderableListing__item--hidden .reorderableListing__actions, .reorderableListing__item--hover .reorderableListing__actions { pointer-events: auto; opacity: 1; } .reorderableListing__item--dragging .reorderableListing__actions, .reorderableListing__row[data-dragging='true'] .reorderableListing__actions { pointer-events: none; opacity: 0; } .reorderableListing__footer { display: flex; align-items: center; width: 100%; } `); }); });