// 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/SearchField/SearchField.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'SearchField.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .searchField { display: inline-flex; min-width: 35px; max-width: 100%; height: calc(24px + 2 * 1px); padding: 4px; font-family: 'Inter', 'Arial', sans-serif; font-size: 12px; font-weight: 400; line-height: 16px; color: oklch(0 0 none); text-align: left; letter-spacing: 0.1px; appearance: textfield; background-color: oklch(1 0 none); border: 1px solid oklch(0.8761 0 none); border-radius: 0px; } .searchField:focus { background-color: oklch(1 0 none); border-color: oklch(0.7247 0.1478 233.0429); outline: 0; box-shadow: 0px 0px 2px 0px oklch(0.7247 0.1478 233.0429); } .searchField:disabled { background-color: oklch(0.9491 0 none); } .searchField.warning-field, .searchField.warning-field:focus { border-color: oklch(0.7251 0.1625 65.1153); } .searchField.error-field, .searchField.error-field:focus { border-color: oklch(0.5999 0.246 28.9803); } .searchField.xs { width: 65px; } .searchField.sm { width: 130px; } .searchField.md { width: 220px; } .searchField.lg { width: 440px; } .searchField.full { width: 100%; } .searchField__placeholder, .searchField::placeholder { overflow: hidden; color: oklch(0.7252 0 none); text-overflow: ellipsis; white-space: nowrap; } .searchField--icon { padding-left: 24px; background-image: url('../../../assets/icons/shp-search.svg'); background-repeat: no-repeat; background-position: calc(4px) center; background-size: 16px; } .searchField .typography { margin: 0; } `); }); });