UNPKG

@asup/simple-table

Version:

REACT table, because I wanted one that took an array of objects as an input.

490 lines (419 loc) 11.8 kB
.ast-SimpleTableCell-module-KqO2pa-cell { border-left: 1px dotted #0000; border-right: 1px dotted #0000; position: relative; } .ast-SimpleTableCell-module-KqO2pa-cell:hover { border-left: 1px solid #000000bf; border-right: 1px solid #000000bf; } .ast-SimpleTableCell-module-KqO2pa-cell div.ast-SimpleTableCell-module-KqO2pa-overflowHidden { white-space: nowrap; text-overflow: ellipsis; width: calc(100% - 8px); padding-left: 4px; padding-right: 4px; overflow: hidden; } .ast-SimpleTableCell-module-KqO2pa-cell div.ast-SimpleTableCell-module-KqO2pa-textRight { text-align: right; } .ast-SimpleTableCell-module-KqO2pa-cell div.ast-SimpleTableCell-module-KqO2pa-textLeft { text-align: left; } .ast-SimpleTableCell-module-KqO2pa-cell div.ast-SimpleTableCell-module-KqO2pa-overflowHidden:hover { white-space: normal; text-overflow: clip; width: auto; overflow: visible; } .ast-SimpleTableCell-module-KqO2pa-cell div.ast-SimpleTableCell-module-KqO2pa-overflowHidden:hover span { background-color: var(--st-main-background-color); z-index: 10; padding-right: 8px; position: relative; } :root { --st-main-background-color: white; --st-header-background-color: white; --st-selected-background-color: #000c; --st-select-active: #f90; --st-select-inactive: #0003; } .ast-SimpleTable-module-byZixa-main { width: 100%; height: 100%; } h5.ast-SimpleTable-module-byZixa-title { flex-grow: 1; height: 30px; margin: 0; font-size: 24px; } .ast-SimpleTable-module-byZixa-title small { font-size: small; } .ast-SimpleTable-module-byZixa-scroll { background-color: var(--st-main-background-color); width: 100%; overflow: auto; } .ast-SimpleTable-module-byZixa-scroll::-webkit-scrollbar { width: 8px; height: 8px; } .ast-SimpleTable-module-byZixa-scroll::-webkit-scrollbar-track { background-color: var(--st-main-background-color); border-radius: 100px; } .ast-SimpleTable-module-byZixa-scroll::-webkit-scrollbar-corner { background-color: var(--st-main-background-color); } .ast-SimpleTable-module-byZixa-scroll::-webkit-scrollbar-thumb { background: #0000004d; border: none; border-radius: 100px; } .ast-SimpleTable-module-byZixa-scroll::-webkit-scrollbar-thumb:hover { background: #000000e6; } .ast-SimpleTable-module-byZixa-holder { width: 100%; height: 100%; position: relative; } .ast-SimpleTable-module-byZixa-titleHolder { background-color: var(--st-main-background-color); white-space: nowrap; box-sizing: content-box; flex-direction: row; align-content: stretch; align-items: center; gap: .5rem; height: 30px; padding-top: 8px; padding-bottom: 8px; display: flex; } .ast-SimpleTable-module-byZixa-table { border-collapse: collapse; table-layout: fixed; width: 1px; position: relative; } .ast-SimpleTable-module-byZixa-footerHolder { white-space: nowrap; background-color: var(--st-main-background-color); flex-direction: row; justify-content: flex-end; gap: .5rem; height: 1.75rem; display: flex; } .ast-SimpleTable-module-byZixa-footerHolder svg { cursor: pointer; } .ast-SimpleTable-module-byZixa-footerHolder select { border-radius: 4px; } th div.overflow-hidden, td div.overflow-hidden { white-space: nowrap; text-overflow: ellipsis; width: calc(100% - 8px); padding-left: 4px; padding-right: 4px; overflow: hidden; } tr.ast-SimpleTableRow-module-KPelGa-selected > td { background-color: var(--st-selected-background-color); } .ast-SimpleTableRow-module-KPelGa-firstcol { opacity: 1; z-index: 1; background-color: var(--st-main-background-color); border-left: 1px dotted #0000; border-right: 1px dotted #0000; position: -webkit-sticky; position: sticky; left: 0; } .ast-SimpleTableRow-module-KPelGa-firstcol:hover { border-left: 1px solid #000000bf; border-right: 1px solid #000000bf; } .ast-SimpleTableBody-module-Y-lNqW-tbody { overflow-y: auto; } .ast-SimpleTableBody-module-Y-lNqW-noKeyField { color: red; } .ast-SimpleTableCheckBox-module-rhSufG-checkboxContainer { box-sizing: border-box !important; width: 24px !important; height: 24px !important; margin: 0 !important; padding: 4px !important; display: inline-block !important; position: relative !important; } .ast-SimpleTableCheckBox-module-rhSufG-checkboxContainer input[type="checkbox"] { opacity: 0 !important; width: 0 !important; height: 0 !important; margin: 0 !important; position: absolute !important; } .ast-SimpleTableCheckBox-module-rhSufG-checkboxContainer:before { content: "" !important; box-sizing: border-box !important; background-color: var(--st-select-inactive) !important; border: 2px solid #000 !important; border-radius: 50% !important; width: 100% !important; height: 100% !important; transition: background-color .2s, border-color .2s !important; display: block !important; } .ast-SimpleTableCheckBox-module-rhSufG-checkboxContainer:has(input[type="checkbox"]:checked):before { background-color: var(--st-select-active) !important; border-color: #000 !important; } .ast-SimpleTableCheckBox-module-rhSufG-checkboxContainer:has(input[type="checkbox"]:indeterminate):before { background: linear-gradient(135deg, var(--st-select-inactive) 50%, var(--st-select-active) 50%) !important; border-color: #000 !important; } .ast-SimpleTableFilter-module-Q8L8jW-holder { cursor: default; order: 3; margin-left: 1rem; display: flex; } .ast-SimpleTableFilter-module-Q8L8jW-holder:last-child { margin-right: 1rem; } .ast-SimpleTableFilter-module-Q8L8jW-label { margin-left: .5rem; display: table-cell; } .ast-SimpleTableHeader-module-rCOiMq-cell { z-index: 1; background-color: var(--st-header-background-color); border-left: 1px dotted #0000; border-right: 1px dotted #0000; position: -webkit-sticky; position: sticky; top: 0; } .ast-SimpleTableHeader-module-rCOiMq-cell:hover { border-left: 1px solid #000000bf; border-right: 1px solid #000000bf; } .ast-SimpleTableHeader-module-rCOiMq-resizeHandle { cursor: col-resize; z-index: 10; border-right: 2px solid #0000; width: 4px; height: 100%; display: inline-block; position: absolute; top: 0; right: 0; } .ast-SimpleTableHeader-module-rCOiMq-resizeHandle:hover { background: #14141480; border-color: #000000bf; } .ast-SimpleTableColumnFilter-module-us4d8a-table { border-collapse: collapse; opacity: 1; flex-direction: column; width: calc(100% - 4px); height: 100%; display: flex; } .ast-SimpleTableColumnFilter-module-us4d8a-table svg { vertical-align: unset; } .ast-SimpleTableColumnFilter-module-us4d8a-table > thead { width: calc(100% - 8px); min-height: 50px; } .ast-SimpleTableColumnFilter-module-us4d8a-table > thead, .ast-SimpleTableColumnFilter-module-us4d8a-table > tbody > tr { table-layout: fixed; width: calc(100% - 3px); display: table; } .ast-SimpleTableColumnFilter-module-us4d8a-table > tbody { border-top: 1px dotted #000; border-bottom: 1px dotted #000; flex: auto; overflow: hidden auto; } .ast-SimpleTableColumnFilter-module-us4d8a-table > tbody > tr > td, .ast-SimpleTableColumnFilter-module-us4d8a-table > tfoot > tr > td { text-align: left; white-space: nowrap; padding-top: 0; padding-left: 4px; padding-right: 4px; font-weight: 400; overflow: hidden; } .ast-SimpleTableColumnFilter-module-us4d8a-table > thead > tr > th:first-child, .ast-SimpleTableColumnFilter-module-us4d8a-table > tbody > tr > td:first-child { text-align: center !important; width: 32px !important; padding: 0 !important; } .ast-SimpleTableColumnFilter-module-us4d8a-table > thead > tr > th, .ast-SimpleTableColumnFilter-module-us4d8a-table > tbody > tr > td { color: #000; background-color: var(--st-main-background-color); text-align: left; height: 16px; font-size: 14px; font-weight: 400; line-height: 16px; } .ast-SimpleTableColumnFilter-module-us4d8a-search { flex-direction: row; align-items: center; width: calc(100% + 8px); display: flex; } .ast-SimpleTableColumnFilter-module-us4d8a-search > input { border: 1px solid #000; border-radius: 4px; width: calc(100% - 24px); margin-left: 4px; line-height: 1px; } .ast-SimpleTableColumnFilter-module-us4d8a-close { color: #000; cursor: pointer; background-color: #fff; border-radius: 3px; width: 16px; height: 16px; margin-left: 2px; line-height: 16px; } .ast-SimpleTableColumnFilter-module-us4d8a-close:hover { color: #fff; background-color: #000; } .ast-SimpleTableColumnFilter-module-us4d8a-boxHeader { opacity: 1; background-color: var(--st-main-background-color); } .ast-SimpleTableColumnFilter-module-us4d8a-scroll::-webkit-scrollbar { width: 8px; height: 8px; } .ast-SimpleTableColumnFilter-module-us4d8a-scroll::-webkit-scrollbar-track { border-radius: 100px; } .ast-SimpleTableColumnFilter-module-us4d8a-scroll::-webkit-scrollbar-thumb { background: #0009; border: none; border-radius: 100px; } .ast-SimpleTableColumnFilter-module-us4d8a-scroll::-webkit-scrollbar-thumb:hover { background: #000000e6; } .ast-SimpleTableHeaderContents-module-hte7-q-filterHolder { z-index: 1000; resize: both; background-color: var(--st-header-background-color); border: 1px solid #000; border-top-right-radius: 8px; border-bottom-left-radius: 8px; width: 200px; min-width: 60px; height: 200px; padding: 4px; position: fixed; top: 1px; overflow: auto; box-shadow: 4px 4px 4px #404040bf; } .ast-SimpleTableHeaderContents-module-hte7-q-text { text-overflow: ellipsis; justify-content: center; height: 100%; display: flex; overflow: hidden visible; } .ast-SimpleTableHeaderContents-module-hte7-q-clickable { cursor: pointer; text-overflow: ellipsis; flex-grow: 1; overflow: hidden visible; } .ast-SimpleTableHeaderContents-module-hte7-q-iconHolder { justify-self: end; align-items: center; min-width: max-content; display: flex; } .ast-Select-module-SkswYq-baseSelect { all: unset; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg fill=\"black\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 10l5 5 5-5z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>"); background-position: 100%; background-repeat: no-repeat; border: 1px solid #000; border-radius: 4px; min-width: 40px; margin-top: 2px; margin-bottom: 2px; padding: 1px 20px 1px 6px; } .ast-SimpleTablePager-module-P9pQIa-footer { text-overflow: ellipsis; flex-direction: row; align-items: center; height: 1.75rem; margin-right: 4px; display: flex; overflow: hidden; } .ast-SimpleTablePager-module-P9pQIa-footer > span { align-items: center; display: flex; } .ast-SimpleTableSearch-module-xBXwEq-holder { order: 2; display: inline-flex; } .ast-SimpleTableSearch-module-xBXwEq-holder > div > input { border: 1px solid #000; border-radius: 4px; margin: .5rem; padding: .25rem; } .ast-SimpleTableSearch-module-xBXwEq-holder > label { align-self: center; margin-top: 0; margin-bottom: 0; margin-right: .5rem; } .ast-SimpleTableSearch-module-xBXwEq-holder:last-child { margin-right: 1rem; } .ast-SimpleTableSelectHeader-module-pMQ3rq-cell { opacity: 1; white-space: nowrap; z-index: 2; background-color: var(--st-header-background-color); border-left: 1px dotted #0000; border-right: 1px dotted #0000; width: 20px; position: -webkit-sticky; position: sticky; top: 0; left: 0; } .ast-SimpleTableSelectHeader-module-pMQ3rq-cell:hover { border-left: 1px solid #000000bf; border-right: 1px solid #000000bf; } /*# sourceMappingURL=main.css.map */