// 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/Fields/FileField/FileField.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'FileField.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .fileField { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; } .fileField__item { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; } .fileField__item .btn { margin: 0; } .fileField__itemButton { cursor: pointer; overflow: hidden; text-align: left; text-overflow: ellipsis; text-wrap: nowrap; } .fileField__itemButtonContainer { display: block; } .fileField__preview { cursor: pointer; overflow: hidden; aspect-ratio: 4 / 3; width: 220px; margin-top: 4px; padding: 0; line-height: 0; background-color: oklch(1 0 none); background-image: linear-gradient(45deg, oklch(0.9401 0 none) 25%, transparent 25%), linear-gradient(-45deg, oklch(0.9401 0 none) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, oklch(0.9401 0 none) 75%), linear-gradient(-45deg, transparent 75%, oklch(0.9401 0 none) 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; border: 1px solid oklch(0.8761 0 none); } .fileField__preview.warning-field { border-color: oklch(0.7251 0.1625 65.1153); } .fileField__preview.error-field { border-color: oklch(0.5999 0.246 28.9803); } .fileField__preview.sm { width: 130px; } .fileField__preview.lg { width: 440px; } .fileField__button { display: flex; gap: 4px; } `); }); });