// 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/PasswordField/PasswordField.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'PasswordField.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .passwordField { 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); letter-spacing: 0.1px; background-color: oklch(1 0 none); border: 1px solid oklch(0.8761 0 none); border-radius: 0px; } .passwordField::placeholder { color: oklch(0.7252 0 none); } .passwordField: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); } .passwordField:disabled { background-color: oklch(0.9491 0 none); } .passwordField.warning-field, .passwordField.warning-field:focus { border-color: oklch(0.7251 0.1625 65.1153); } .passwordField.error-field, .passwordField.error-field:focus { border-color: oklch(0.5999 0.246 28.9803); } .passwordField.md { width: 220px; } .passwordField.lg { width: 440px; } .passwordField__strengthIndicator { display: flex; align-items: center; justify-content: center; height: calc(24px + 2 * 1px); } .passwordField__control { display: flex; gap: 4px; align-items: flex-start; } .passwordField__control .v2FormField__inputInner { flex: 1 1 auto; min-width: 0; } .passwordField__overlay { pointer-events: none; position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding: 4px; font-family: 'Inter', 'Arial', sans-serif; font-size: 12px; font-weight: 400; line-height: 16px; color: oklch(0 0 none); letter-spacing: 0.1px; border: 1px solid transparent; } `); }); });