// 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/Table/Table.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'Table.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .tableWrapper { overflow: auto hidden; width: 100%; } .table { border-collapse: collapse; width: 100%; margin-bottom: 12px; } .table thead { background-color: oklch(0.9491 0 none); border-bottom: 3px solid oklch(0.7247 0.1478 233.0429); } .table tfoot { background-color: oklch(0.9491 0 none); border-top: 3px solid oklch(0.7247 0.1478 233.0429); } .table td, .table th { padding: 8px; text-align: left; background-clip: padding-box; border: 1px solid oklch(0.8761 0 none); } .table th { color: oklch(0 0 none); background-color: oklch(0.9491 0 none); } .table th:hover { color: oklch(0.4239 0 none); } .table th .iconButton { margin: -0.125em; } .table .th__overLineWrapper { display: flex; flex-flow: column; } .table .th__overline { font-weight: 400; } .table tbody td { background-color: oklch(1 0 none); } .table tr:nth-child(2n) td:where(:not([style*='background-color'])) { background-color: oklch(1 0 none); background-image: linear-gradient(90deg, oklch(0.9491 0 none / 0.6) 0%, oklch(0.9491 0 none / 0.6) 100%); } .table .table__hideOnMouseOut { visibility: hidden; } .table tr:hover .hide-on-mouseout, .table tr:hover .table__hideOnMouseOut, .table tr:focus-within .hide-on-mouseout, .table tr:focus-within .table__hideOnMouseOut { visibility: visible; } .table .tDnD_whileDrag { position: relative; z-index: 1; display: table-row; box-shadow: 0px 3px 7px 0px oklch(0 0 none / 0.1), 0px -3px 7px 0px oklch(0 0 none / 0.1); } .table .tDnD_whileDrag td, .table .tDnD_whileDrag:nth-child(2n) td { background-color: oklch(0.9496 0.0283 234.8404); } .table tr.table__row--hidden, .table tr.table__row--muted { font-style: italic; color: oklch(0.7252 0 none); } .table tr.table__row--hidden a, .table tr.table__row--muted a { color: oklch(0.7252 0 none); } .table tr.table__row--dragging { position: relative; z-index: 1; display: table-row; box-shadow: 0px 3px 7px 0px oklch(0 0 none / 0.1), 0px -3px 7px 0px oklch(0 0 none / 0.1); } .table tr.table__row--dragging td, .table tr.table__row--dragging:nth-child(2n) td { background-color: oklch(0.9496 0.0283 234.8404); } .table tr.table__row--attention td { font-weight: bold; background: oklch(0.9508 0.0232 264.4578); } .table tr.table__row--success td { background: oklch(0.9498 0.0374 130.3793); } .table tr.table__row--alert td { background: oklch(0.9494 0.0613 88.8077); } .table tr.table__row--error td { background: oklch(0.95 0.0248 2.0777); } .table .table__cell--sorting { position: relative; padding-right: calc(8px * 2 + 6px); } .table .table__cell--sorting .sorting { position: absolute; top: 50%; right: 0; transform: translateY(-50%); margin: 0; } .table .table__cell--massAction, .table .table__cell--actions, .table .table__cell--calloutActions, .table .table__cell--preview { width: 1%; text-align: center; } .table .table__cell--price, .table .table__cell--pricePrimary { width: 10%; text-align: right; } .table .table__cell--number, .table .table__cell--datetime { text-align: right; } .table .table__cell--balance { font-weight: 700; text-align: right; } .table .table__cell--headline { font-weight: bold; text-align: center; background: oklch(0.9491 0 none); } .table .table__cell--image, .table .table__cell--imageBig { width: 30px; } .table .table__cell--image img, .table .table__cell--imageBig img { width: inherit; max-width: unset; } @media only screen and (min-width: 576px) { .table .table__cell--imageBig { width: 170px; } } .table .table__cell--small { width: 10%; } .table .table__cell--medium { width: 20%; } .table .table__cell--large { width: 50%; } .table .table__cell--attention, .table tr:nth-child(2n) .table__cell--attention { background-color: oklch(0.9508 0.0232 264.4578); } .table td.table__cell--massAction, .table td.table__cell--actions, .table td.table__cell--calloutActions, .table td.table__cell--preview, .table td.table__cell--price, .table td.table__cell--pricePrimary, .table td.table__cell--summary { white-space: nowrap; } .table td.table__cell--pricePrimary { font-weight: 700; } .table td.table__cell--summary { font-weight: 700; } .table td.table__cell--balanceNegative { color: oklch(0.5999 0.246 28.9803); } .table .table__detailLink { display: block; text-decoration: none; } .table .table__detailLink * { text-decoration: none; } .table label.std-control-label, .table #filter-form label.std-control-label { margin: 0; } .table .imagePreview { display: inline-block; width: 30px; } .table .imagePreview[data-zoomed-image] { touch-action: none; cursor: zoom-in; } .table .information-bubble-wrap { white-space: normal; } .table__cell--stickyStart, .table__cell--stickyEnd { position: sticky; z-index: 1; } .table__cell--stickyStart { left: 0; } .table__cell--stickyEnd { right: 0; } .table__cell--stickyStart::after, .table__cell--stickyEnd::after { pointer-events: none; content: ''; position: absolute; top: 0; right: -1px; bottom: 0; left: -1px; border-right: 1px solid oklch(0.8761 0 none); border-left: 1px solid oklch(0.8761 0 none); } .table__filterCollapsible { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; } .table__filterCollapsibleToggle { display: flex; flex-direction: row; justify-content: end; } .table__filterCollapsible--open { float: none; } .table__filterCollapsible--closed { float: right; } .table__empty { padding-top: 8rem; padding-bottom: 8rem; font-size: 1.25rem; color: oklch(0.7252 0 none); text-align: center; } `); }); });