Skip to content

Commit

Permalink
Table Revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
ponnexcodev committed Oct 23, 2024
1 parent 23a1417 commit 6fa3499
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 365 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system-root",
"version": "16.22.10",
"version": "16.23.7-17",
"private": true,
"description": "Root design system mono-repo package.",
"homepage": "https://github.com/Toniq-Labs/toniq-labs-design-system",
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@toniq-labs/design-system",
"version": "16.22.10",
"version": "16.23.7-17",
"private": false,
"description": "Design system elements for Toniq Labs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {defineBookPage} from 'element-book';
import {CSSResult, HTMLTemplateResult, css, html, listen, unsafeCSS} from 'element-vir';
import {noNativeFormStyles} from 'vira';
import {elementsBookPage} from '../../element-book/book-pages/elements.book';
import {CryptoBtc24Icon, Target24Icon} from '../../icons';
import {CryptoBtc24Icon} from '../../icons';
import {toniqFontStyles} from '../../styles';
import {toniqColors} from '../../styles/colors';
import {defineToniqElementNoInputs} from '../define-toniq-element';
Expand Down Expand Up @@ -1010,22 +1010,6 @@ const examples: ReadonlyArray<
},
},
},
{
title: 'with pagination and custom action',
inputs: {
pagination: {
currentPage: 1,
pageCount: 10,
},
paginationAction: html`
<${ToniqIcon.assign({icon: Target24Icon})}
${listen('click', () => {
alert('pagination action');
})}
></${ToniqIcon}>
`,
},
},
{
title: 'squished horizontally',
styles: css`
Expand Down Expand Up @@ -1265,7 +1249,6 @@ export const toniqListTableElementBookPage = defineBookPage({
currentPage: 1,
pageCount: 5,
},
nonBlocking: true,
})}></${ToniqListTable}>
`;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ describe(ToniqListTable.tagName, () => {
<${ToniqListTable.assign(testCase.inputs)}></${ToniqListTable}>
`);
assertInstanceOf(renderedToniqListTable, ToniqListTable);
const renderedRows = renderedToniqListTable.shadowRoot.querySelectorAll('.row-wrapper');
const renderedRows = renderedToniqListTable.shadowRoot
.querySelector('.column-wrapper')
?.querySelectorAll('.column-content');

if (testCase.inputs.pagination) {
assertInstanceOf(renderedToniqListTable, ToniqListTable);
Expand All @@ -56,7 +58,7 @@ describe(ToniqListTable.tagName, () => {

return {
// Minus the header row
row: renderedRows.length - 1,
row: renderedRows ? renderedRows.length - 1 : 0,
};
}

Expand Down
Loading

0 comments on commit 6fa3499

Please sign in to comment.