// 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/IconButton/IconButton.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'IconButton.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .iconButton { --transitionDuration: 300ms; cursor: pointer; position: relative; padding: 0; background-color: transparent; border: 1px solid transparent; } .iconButton--sm { width: 26px; height: 26px; } .iconButton--md { width: 32px; height: 32px; } .iconButton--lg { width: 48px; height: 48px; } .iconButton--primary { color: oklch(0.7247 0.1478 233.0429); border-color: oklch(0.7247 0.1478 233.0429); } .iconButton--primary:hover { color: oklch(0.5994 0.1244 233.3833); border-color: oklch(0.5994 0.1244 233.3833); } .iconButton--primary--disabled { cursor: default; color: oklch(0.7252 0 none); border-color: oklch(0.5999 0 none); } .iconButton--secondary { color: oklch(0 0 none); border-color: oklch(0.5999 0 none); } .iconButton--secondary:hover { color: oklch(0.4239 0 none); border-color: oklch(0.4239 0 none); } .iconButton--secondary--disabled { cursor: default; color: oklch(0.7252 0 none); border-color: oklch(0.5999 0 none); } .iconButton--action { color: oklch(0.7257 0.1702 129.1931); border-color: oklch(0.7257 0.1702 129.1931); } .iconButton--action:hover { color: oklch(0.5998 0.1588 128.886); border-color: oklch(0.5998 0.1588 128.886); } .iconButton--action--disabled { cursor: default; color: oklch(0.7252 0 none); border-color: oklch(0.5999 0 none); } .iconButton--destructive { color: oklch(0.5999 0.246 28.9803); border-color: oklch(0.5999 0.246 28.9803); } .iconButton--destructive:hover { color: oklch(0.525 0.2153 29.0445); border-color: oklch(0.525 0.2153 29.0445); } .iconButton--destructive--disabled { cursor: default; color: oklch(0.7252 0 none); border-color: oklch(0.5999 0 none); } .iconButton--ghost, .iconButton--ghost:hover { border-color: transparent; } .iconButton > .loader { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; } @media (prefers-reduced-motion: reduce) { .iconButton { --transitionDuration: 0ms; } } .iconButton > .icon { transition-timing-function: ease-out; transition-duration: var(--transitionDuration); transition-property: opacity; } .iconButton--isLoading > .icon { opacity: 0; } `); }); });