// 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/SingleSelectField/SingleSelectField.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'SingleSelectField.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .singleSelectField__combobox { display: contents; } .singleSelectField__popover { overflow-y: auto; display: flex; flex-direction: column; min-width: var(--trigger-width); max-width: calc(100vw - 2 * 16px); max-width: calc(100dvw - 2 * 16px); max-height: 360px; margin-top: 5px; margin-bottom: 5px; background-color: oklch(1 0 none); box-shadow: 0px 3px 7px 0px oklch(0 0 none / 0.1), 0px -3px 7px 0px oklch(0 0 none / 0.1); } .singleSelectField__popover .dataList { flex: 1; } .singleSelectField__emptyState { display: flex; flex-grow: 1; align-items: center; justify-content: center; padding: 4px; } .singleSelectField__checkedIndicator { color: transparent; } .singleSelectField__checkedPlaceholder { width: 24px; } :where([role='option'][data-hovered='true']) > .singleSelectField__checkedIndicator, :where([role='option'][data-focused='true']) > .singleSelectField__checkedIndicator, :where([role='option'][data-active='true']) > .singleSelectField__checkedIndicator { color: oklch(0.8761 0 none); } :where([role='option'][aria-selected='true']) > .singleSelectField__checkedIndicator { color: oklch(0.7247 0.1478 233.0429); } .singleSelectField__inputTrigger { overflow: hidden; display: inline-flex; } .searchField.singleSelectField__inputTrigger--picker { padding-right: 24px; background-image: url('../../../assets/icons/shp-down.svg'); background-repeat: no-repeat; background-position: calc(100% - 4px) center; background-size: 18px; } .v2FormField__singleSelect:has(.loader) .searchField { appearance: textfield; } .v2FormField__singleSelect:has(.loader) .searchField::-webkit-search-cancel-button { appearance: none; } `); }); });