diff --git a/src/components/ListTable.js b/src/components/ListTable.js index 8bebf6df3..5f4dd93f4 100644 --- a/src/components/ListTable.js +++ b/src/components/ListTable.js @@ -297,7 +297,7 @@ const ListTable = ({ nodeData: { children, options }, ...rest }) => { {headerRowCount > 0 && table.getHeaderGroups().map((headerGroup) => ( - + {headerGroup.headers.map((header) => { return ( diff --git a/tests/unit/__snapshots__/ListTable.test.js.snap b/tests/unit/__snapshots__/ListTable.test.js.snap index b4a02eee6..87c3f6566 100644 --- a/tests/unit/__snapshots__/ListTable.test.js.snap +++ b/tests/unit/__snapshots__/ListTable.test.js.snap @@ -7,6 +7,7 @@ exports[`when rendering a list table with fixed widths renders correctly 1`] = ` width: 100%; position: relative; margin: 24px 0; + table-layout: fixed; } .emotion-1 { @@ -35,11 +36,15 @@ exports[`when rendering a list table with fixed widths renders correctly 1`] = ` .emotion-3 { padding: 0 8px; overflow: hidden; + padding-left: 32px; padding: 10px 8px!important; vertical-align: top; color: var(--font-color-primary); overflow-wrap: anywhere; word-break: break-word; + -webkit-align-content: flex-start; + -ms-flex-line-pack: flex-start; + align-content: flex-start; } .emotion-3:focus-visible { @@ -50,10 +55,6 @@ exports[`when rendering a list table with fixed widths renders correctly 1`] = ` padding-right: 24px; } -.emotion-3:first-child { - padding-left: 32px; -} - .emotion-3 * { font-size: 13px!important; line-height: inherit; @@ -64,18 +65,31 @@ exports[`when rendering a list table with fixed widths renders correctly 1`] = ` min-height: unset; } +.emotion-3>div { + min-height: unset; + max-height: unset; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: flex-start; + -webkit-box-align: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; +} + .emotion-3 *, .emotion-3 p, .emotion-3 a { line-height: 20px; } -.emotion-3>div>div>*, +.emotion-3>div>*, .emotion-3>div>div p { margin: 0 0 12px; } -.emotion-3>div>div>*:last-child { +.emotion-3>div>div *:last-child, +.emotion-3>div>*:last-child { margin-bottom: 0; } @@ -92,6 +106,9 @@ exports[`when rendering a list table with fixed widths renders correctly 1`] = ` transition-property: min-height,max-height,opacity,padding,transform; transition-duration: 150ms; transition-timing-function: ease; + opacity: 1; + min-height: 40px; + max-height: 40px; -webkit-box-pack: left; -ms-flex-pack: left; -webkit-justify-content: left; @@ -99,6 +116,82 @@ exports[`when rendering a list table with fixed widths renders correctly 1`] = ` text-align: left; } +.emotion-5 { + margin: unset; + font-family: 'Euclid Circular A','Helvetica Neue',Helvetica,Arial,sans-serif; + color: #001E2B; + font-size: 13px; + line-height: 20px; + color: #001E2B; + font-weight: 400; + margin-bottom: 16px; + color: var(--font-color-primary); +} + +.emotion-5 strong, +.emotion-5 b { + font-weight: 700; +} + +.emotion-6 { + padding: 0 8px; + overflow: hidden; + padding: 10px 8px!important; + vertical-align: top; + color: var(--font-color-primary); + overflow-wrap: anywhere; + word-break: break-word; + -webkit-align-content: flex-start; + -ms-flex-line-pack: flex-start; + align-content: flex-start; +} + +.emotion-6:focus-visible { + box-shadow: inset; +} + +.emotion-6:last-child { + padding-right: 24px; +} + +.emotion-6 * { + font-size: 13px!important; + line-height: inherit; +} + +.emotion-6>div { + height: unset; + min-height: unset; +} + +.emotion-6>div { + min-height: unset; + max-height: unset; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: flex-start; + -webkit-box-align: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; +} + +.emotion-6 *, +.emotion-6 p, +.emotion-6 a { + line-height: 20px; +} + +.emotion-6>div>*, +.emotion-6>div>div p { + margin: 0 0 12px; +} + +.emotion-6>div>div *:last-child, +.emotion-6>div>*:last-child { + margin-bottom: 0; +} +
-
+

notebook -

+

-
+

50 -

+

-
+

8.5x11,in -

+

-
+

A -

+

-
+

college-ruled,perforated -

+

-
+

8 -

+

@@ -213,6 +327,7 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` width: 100%; position: relative; margin: 24px 0; + table-layout: fixed; } .emotion-1 { @@ -242,12 +357,14 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` padding: 0 8px; overflow: hidden; padding-left: 32px; + width: 150px; padding: 10px 8px!important; vertical-align: top; color: var(--font-color-primary); line-height: 24px; font-weight: 600; font-size: 13px; + width: auto; } .emotion-3:focus-visible { @@ -292,12 +409,14 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` .emotion-5 { padding: 0 8px; overflow: hidden; + width: 150px; padding: 10px 8px!important; vertical-align: top; color: var(--font-color-primary); line-height: 24px; font-weight: 600; font-size: 13px; + width: auto; } .emotion-5:focus-visible { @@ -333,11 +452,15 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` .emotion-16 { padding: 0 8px; overflow: hidden; + padding-left: 32px; padding: 10px 8px!important; vertical-align: top; color: var(--font-color-primary); overflow-wrap: anywhere; word-break: break-word; + -webkit-align-content: flex-start; + -ms-flex-line-pack: flex-start; + align-content: flex-start; background-color: #F9FBFA; border-right: 3px solid #E8EDEB; font-weight: 600; @@ -351,10 +474,6 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` padding-right: 24px; } -.emotion-16:first-child { - padding-left: 32px; -} - .emotion-16 * { font-size: 13px!important; line-height: inherit; @@ -365,18 +484,31 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` min-height: unset; } +.emotion-16>div { + min-height: unset; + max-height: unset; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: flex-start; + -webkit-box-align: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; +} + .emotion-16 *, .emotion-16 p, .emotion-16 a { line-height: 20px; } -.emotion-16>div>div>*, +.emotion-16>div>*, .emotion-16>div>div p { margin: 0 0 12px; } -.emotion-16>div>div>*:last-child { +.emotion-16>div>div *:last-child, +.emotion-16>div>*:last-child { margin-bottom: 0; } @@ -398,6 +530,9 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` transition-property: min-height,max-height,opacity,padding,transform; transition-duration: 150ms; transition-timing-function: ease; + opacity: 1; + min-height: 40px; + max-height: 40px; -webkit-box-pack: left; -ms-flex-pack: left; -webkit-justify-content: left; @@ -406,6 +541,23 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` } .emotion-18 { + margin: unset; + font-family: 'Euclid Circular A','Helvetica Neue',Helvetica,Arial,sans-serif; + color: #001E2B; + font-size: 13px; + line-height: 20px; + color: #001E2B; + font-weight: 400; + margin-bottom: 16px; + color: var(--font-color-primary); +} + +.emotion-18 strong, +.emotion-18 b { + font-weight: 700; +} + +.emotion-19 { padding: 0 8px; overflow: hidden; padding: 10px 8px!important; @@ -413,42 +565,54 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` color: var(--font-color-primary); overflow-wrap: anywhere; word-break: break-word; + -webkit-align-content: flex-start; + -ms-flex-line-pack: flex-start; + align-content: flex-start; } -.emotion-18:focus-visible { +.emotion-19:focus-visible { box-shadow: inset; } -.emotion-18:last-child { +.emotion-19:last-child { padding-right: 24px; } -.emotion-18:first-child { - padding-left: 32px; -} - -.emotion-18 * { +.emotion-19 * { font-size: 13px!important; line-height: inherit; } -.emotion-18>div { +.emotion-19>div { height: unset; min-height: unset; } -.emotion-18 *, -.emotion-18 p, -.emotion-18 a { +.emotion-19>div { + min-height: unset; + max-height: unset; + -webkit-flex-direction: column; + -ms-flex-direction: column; + flex-direction: column; + -webkit-align-items: flex-start; + -webkit-box-align: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; +} + +.emotion-19 *, +.emotion-19 p, +.emotion-19 a { line-height: 20px; } -.emotion-18>div>div>*, -.emotion-18>div>div p { +.emotion-19>div>*, +.emotion-19>div>div p { margin: 0 0 12px; } -.emotion-18>div>div>*:last-child { +.emotion-19>div>div *:last-child, +.emotion-19>div>*:last-child { margin-bottom: 0; } @@ -467,437 +631,524 @@ exports[`when rendering a list-table directive renders correctly 1`] = ` >
-
- name -
+ name
-
- quantity -
+ quantity
-
- size -
+ size
-
- status -
+ status
-
- tags -
+ tags
-
- rating -
+ rating
-
+

journal -

+

-
+

25 -

+

-
+

14x21,cm -

+

-
+

A -

+

-
+

brown, lined -

+

-
+

9 -

+

-
+

notebook -

+

-
+

50 -

+

-
+

8.5x11,in -

+

-
+

A -

+

-
+

college-ruled,perforated -

+

-
+

8 -

+

-
+

paper -

+

-
+

100 -

+

-
+

8.5x11,in -

+

-
+

D -

+

-
+

watercolor -

+

-
+

10 -

+

-
+

planner -

+

-
+

75 -

+

-
+

22.85x30,cm -

+

-
+

D -

+

-
+

2019 -

+

-
+

10 -

+

-
+

postcard -

+

-
+

45 -

+

-
+

10x,cm -

+

-
+

D -

+

-
+

double-sided,white -

+

-
+

2 -

+