UNPKG

@fesjs/fes-design

Version:
313 lines (312 loc) 10.2 kB
.fes-table { position: relative; box-sizing: border-box; width: 100%; max-width: 100%; height: -moz-fit-content; height: fit-content; margin: 0; padding: 0; outline: none; color: var(--f-text-color); font-size: var(--f-font-size-base); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-variant: tabular-nums; line-height: 22px; font-feature-settings: 'tnum'; overflow: hidden; background-color: var(--f-white); } .fes-table, .fes-table * { box-sizing: border-box; } .fes-table .hidden-columns { display: none; } .fes-table .fes-table-header-wrapper, .fes-table .fes-table-body-wrapper { position: relative; width: 100%; height: auto; overflow: hidden; scrollbar-width: none; } .fes-table .fes-table-header-wrapper.is-scrolling-x-left .fes-table-fixed-right.is-first, .fes-table .fes-table-body-wrapper.is-scrolling-x-left .fes-table-fixed-right.is-first, .fes-table .fes-table-header-wrapper.is-scrolling-x-middle .fes-table-fixed-right.is-first, .fes-table .fes-table-body-wrapper.is-scrolling-x-middle .fes-table-fixed-right.is-first { box-shadow: -1px 2px var(--f-shadow-radius-sm) var(--f-shadow-color-sm); } .fes-table .fes-table-header-wrapper.is-scrolling-x-right .fes-table-fixed-left.is-last, .fes-table .fes-table-body-wrapper.is-scrolling-x-right .fes-table-fixed-left.is-last, .fes-table .fes-table-header-wrapper.is-scrolling-x-middle .fes-table-fixed-left.is-last, .fes-table .fes-table-body-wrapper.is-scrolling-x-middle .fes-table-fixed-left.is-last { box-shadow: 2px 2px var(--f-shadow-radius-sm) -1px var(--f-shadow-color-sm); } .fes-table .fes-table-header-wrapper::-webkit-scrollbar, .fes-table .fes-table-body-wrapper::-webkit-scrollbar { display: none; } .fes-table .fes-table-body-wrapper.is-scrolling-x-left.columns-fixed-left::after, .fes-table .fes-table-body-wrapper.is-scrolling-x-middle.columns-fixed-left::after { position: absolute; z-index: 1; display: block; content: ''; top: 0; right: -4px; width: 4px; height: 100%; box-shadow: -1px 0 var(--f-shadow-radius-sm) var(--f-shadow-color-sm); z-index: 3; } .fes-table .fes-table-body-wrapper.is-scrolling-x-right.columns-fixed-right::after, .fes-table .fes-table-body-wrapper.is-scrolling-x-middle.columns-fixed-right::after { position: absolute; z-index: 1; display: block; content: ''; top: 0; left: -4px; width: 4px; height: 100%; box-shadow: 1px 0 var(--f-shadow-radius-sm) var(--f-shadow-color-sm); z-index: 3; } .fes-table .fes-table-header-shadow-left { position: absolute; z-index: 1; display: block; content: ''; top: 0; right: -4px; width: 4px; height: 100%; box-shadow: -1px 0 var(--f-shadow-radius-sm) var(--f-shadow-color-sm); z-index: 3; } .fes-table .fes-table-header-shadow-right { position: absolute; z-index: 1; display: block; content: ''; top: 0; left: -4px; width: 4px; height: 100%; box-shadow: 1px 0 var(--f-shadow-radius-sm) var(--f-shadow-color-sm); z-index: 3; } .fes-table .fes-table-no-data { text-align: center; } .fes-table .fes-table-header, .fes-table .fes-table-body { display: table; margin: 0; padding: 0; table-layout: fixed; border: 0; border-collapse: separate; border-spacing: 0; } .fes-table .fes-table-header .fes-table-row, .fes-table .fes-table-body .fes-table-row { box-sizing: border-box; border: none; } .fes-table .fes-table-header .fes-table-row.is-opened .fes-table-expand-icon, .fes-table .fes-table-body .fes-table-row.is-opened .fes-table-expand-icon { transform: rotate(0); } .fes-table .fes-table-header .fes-table-row.is-opened + .fes-table-tr .fes-table-td, .fes-table .fes-table-body .fes-table-row.is-opened + .fes-table-tr .fes-table-td { background-color: var(--f-component-bg-color); } .fes-table .fes-table-header .fes-table-th, .fes-table .fes-table-body .fes-table-th, .fes-table .fes-table-header .fes-table-td, .fes-table .fes-table-body .fes-table-td { position: relative; min-width: 0; margin: 0; padding: 0; background-color: var(--f-white); border: none; } .fes-table .fes-table-header .fes-table-th.fes-table-fixed-left, .fes-table .fes-table-body .fes-table-th.fes-table-fixed-left, .fes-table .fes-table-header .fes-table-td.fes-table-fixed-left, .fes-table .fes-table-body .fes-table-td.fes-table-fixed-left { position: sticky; left: 0; z-index: 2; } .fes-table .fes-table-header .fes-table-th.fes-table-fixed-right, .fes-table .fes-table-body .fes-table-th.fes-table-fixed-right, .fes-table .fes-table-header .fes-table-td.fes-table-fixed-right, .fes-table .fes-table-body .fes-table-td.fes-table-fixed-right { position: sticky; right: 0; z-index: 2; } .fes-table .fes-table-header .fes-table-th, .fes-table .fes-table-body .fes-table-th { font-weight: 500; background-color: var(--f-component-bg-color); } .fes-table .fes-table-header .fes-table-td, .fes-table .fes-table-body .fes-table-td { background-color: var(--f-white); } .fes-table .fes-table-header .fes-table-td.fes-table-cell, .fes-table .fes-table-body .fes-table-td.fes-table-cell { overflow: hidden; white-space: normal; word-break: break-all; } .fes-table .fes-table-body.is-hoverable .fes-table-row:hover .fes-table-td { background-color: var(--f-hover-color-light); } .fes-table .fes-table-body .fes-table-row.is-striped .fes-table-td { background-color: var(--f-component-bg-color); } .fes-table.is-bordered { border: var(--f-border-width-base) var(--f-border-style-base) var(--f-border-color-split); } .fes-table.is-horizontal-line .fes-table-header .fes-table-td, .fes-table.is-horizontal-line .fes-table-body .fes-table-td, .fes-table.is-horizontal-line .fes-table-header .fes-table-th, .fes-table.is-horizontal-line .fes-table-body .fes-table-th { border-bottom: var(--f-border-width-base) var(--f-border-style-base) var(--f-border-color-split); } .fes-table.is-horizontal-line .fes-table-header .fes-table-row.is-opened .fes-table-td, .fes-table.is-horizontal-line .fes-table-body .fes-table-row.is-opened .fes-table-td { border-bottom: none; } .fes-table.is-horizontal-line .fes-table-no-data { border-bottom: var(--f-border-width-base) var(--f-border-style-base) var(--f-border-color-split); } .fes-table.is-horizontal-line.is-bordered .fes-table-header tbody .fes-table-row .fes-table-td.is-last-row, .fes-table.is-horizontal-line.is-bordered .fes-table-body tbody .fes-table-row .fes-table-td.is-last-row { border-bottom: none; } .fes-table.is-horizontal-line.is-bordered .fes-table-no-data { border-bottom: none; } .fes-table.is-vertical-line .fes-table-header .fes-table-th, .fes-table.is-vertical-line .fes-table-body .fes-table-th, .fes-table.is-vertical-line .fes-table-header .fes-table-td, .fes-table.is-vertical-line .fes-table-body .fes-table-td { border-right: var(--f-border-width-base) var(--f-border-style-base) var(--f-border-color-split); } .fes-table.is-vertical-line .fes-table-header .fes-table-row .fes-table-td.is-last-column, .fes-table.is-vertical-line .fes-table-body .fes-table-row .fes-table-td.is-last-column { border-right: none; } .fes-table.is-vertical-line .fes-table-header .fes-table-row .fes-table-th.fes-table-th-last, .fes-table.is-vertical-line .fes-table-body .fes-table-row .fes-table-th.fes-table-th-last { border-right: none; } .fes-table.is-size-middle .fes-table-cell { padding: var(--f-padding-middle); } .fes-table.is-size-middle .fes-table-cell.fes-table-expanded-cell { padding: 0; } .fes-table.is-size-middle .fes-table-no-data { padding: var(--f-padding-middle); } .fes-table.is-size-small .fes-table-cell { padding: var(--f-padding-xsmall); } .fes-table.is-size-small .fes-table-cell.fes-table-expanded-cell { padding: 0; } .fes-table.is-size-small .fes-table-no-data { padding: var(--f-padding-xsmall); } .fes-table-expand-icon { color: var(--f-text-color); font-size: calc(var(--f-font-size-base) + 2px); transform: rotate(-90deg); cursor: pointer; transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); } .fes-table-expand-icon:hover { color: var(--f-primary-color); } .fes-table-center { display: flex; align-items: center; } .fes-table .fes-table-sorter { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; margin-top: -0.2em; margin-left: var(--f-padding-small); vertical-align: middle; } .fes-table .fes-table-sorter .fes-table-sorter-up { width: 0; height: 0; border-right: 4px solid transparent; border-bottom: 4px solid var(--f-disabled-color-base); border-left: 4px solid transparent; } .fes-table .fes-table-sorter .fes-table-sorter-up.is-active { border-bottom-color: var(--f-primary-color); } .fes-table .fes-table-sorter .fes-table-sorter-down { width: 0; height: 0; margin-top: calc(var(--f-padding-xsmall) / 4); border-top: 4px solid var(--f-disabled-color-base); border-right: 4px solid transparent; border-left: 4px solid transparent; } .fes-table .fes-table-sorter .fes-table-sorter-down.is-active { border-top-color: var(--f-primary-color); } .fes-table .fes-table-th-sortable { cursor: pointer; } .fes-table .fes-table-resize-button { position: absolute; top: 0; right: 4px; bottom: 0; width: 8px; cursor: col-resize; -webkit-user-select: none; -moz-user-select: none; user-select: none; } .fes-table .fes-table-resize-button::after { position: absolute; top: 50%; bottom: 0; left: 4px; z-index: 1; width: 2px; height: 50%; background-color: var(--f-border-color-split); transform: translate(-50%, -50%); transition: background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); content: ''; } .fes-table .fes-table-resize-button.is-active::after { background-color: var(--f-primary-color); } .fes-table.is-vertical-line .fes-table-resize-button { right: -4px; } .fes-table.is-vertical-line .fes-table-resize-button::after { background-color: none; } .fes-table.is-vertical-line .fes-table-resize-button.is-active::after { background-color: var(--f-primary-color); }