UNPKG

winbox-ui-next

Version:

We Design Vue 2.0: A Vue.js 3 UI Library

689 lines (688 loc) 18.4 kB
/******** borderSize *******/ /******** borderStyle *******/ /******** radius *******/ /******** shadow distance *******/ /******** size *******/ /******** spacing *******/ /******** shadow *******/ /******** opacity *******/ /******** fontSize *******/ /******** fontWeight ********/ /******** radius *******/ /******** Primary *******/ /******** success *******/ /******** warning *******/ /******** danger *******/ /******** link *******/ /******** radius *******/ /********* icon hover *********/ .w-table-filters-content { box-sizing: border-box; min-width: 100px; background: var(--color-bg-5); border: 1px solid var(--color-neutral-3); border-radius: var(--border-radius-medium); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .w-table-filters-list { max-height: 200px; padding: 4px 0; overflow-y: auto; } .w-table-filters-item { height: 32px; padding: 0 12px; font-size: 14px; line-height: 32px; } .w-table-filters-text { width: 100%; max-width: 160px; height: 34px; margin-right: 0; padding-left: 10px; overflow: hidden; line-height: 32px; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; } .w-table-filters-bottom { box-sizing: border-box; height: 38px; padding: 0 12px; overflow: hidden; line-height: 38px; border-top: 1px solid var(--color-neutral-3); } .w-table-filters-bottom > *:not(*:last-child) { margin-right: 8px; } .w-table { position: relative; /* ---- Table sorter, filter, checkbox, radio (End) ---- */ } .w-table-column-handle { position: absolute; top: 0; right: -4px; z-index: 1; width: 8px; height: 100%; cursor: col-resize; } .w-table .w-spin { display: flex; flex-direction: column; height: 100%; } .w-table > .w-spin > .w-spin-children::after { z-index: 2; } .w-table-footer { border-radius: 0 0 var(--border-radius-medium) var(--border-radius-medium); } .w-table-scroll-position-right .w-table-col-fixed-left-last::after, .w-table-scroll-position-middle .w-table-col-fixed-left-last::after { box-shadow: inset 6px 0 8px -3px rgba(0, 0, 0, 0.15); } .w-table-scroll-position-left .w-table-col-fixed-right-first::after, .w-table-scroll-position-middle .w-table-col-fixed-right-first::after { box-shadow: inset -6px 0 8px -3px rgba(0, 0, 0, 0.15); } .w-table-layout-fixed .w-table-element { table-layout: fixed; } .w-table .w-table-element { width: 100%; min-width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; } .w-table-th { position: relative; box-sizing: border-box; color: rgb(var(--gray-10)); font-weight: 500; line-height: 1.5715; text-align: left; background-color: var(--color-neutral-2); } .w-table-th[colspan] { text-align: center; } .w-table-th-align-right { text-align: right; } .w-table-th-align-right .w-table-cell-with-sorter { justify-content: flex-end; } .w-table-th-align-center { text-align: center; } .w-table-th-align-center .w-table-cell-with-sorter { justify-content: center; } .w-table-td { box-sizing: border-box; color: rgb(var(--gray-10)); line-height: 1.5715; text-align: left; word-break: break-all; background-color: var(--color-bg-2); border-bottom: 1px solid var(--color-neutral-3); } .w-table-td-align-right { text-align: right; } .w-table-td-align-center { text-align: center; } .w-table-td.w-table-drag-handle { cursor: move; } .w-table-cell { display: flex; align-items: center; } .w-table-cell-align-right { justify-content: flex-end; text-align: right; } .w-table-cell-align-center { justify-content: center; text-align: center; } .w-table-text-ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .w-table-td-content { display: block; width: 100%; } .w-table-th.w-table-col-sorted { background-color: var(--color-neutral-3); } .w-table-td.w-table-col-sorted { background-color: var(--color-fill-1); } .w-table-col-fixed-left, .w-table-col-fixed-right { position: sticky; z-index: 10; } .w-table-col-fixed-left-last::after, .w-table-col-fixed-right-first::after { position: absolute; top: 0; bottom: -1px; left: 0; width: 10px; box-shadow: none; transform: translateX(-100%); transition: box-shadow 0.1s cubic-bezier(0, 0, 1, 1); content: ''; pointer-events: none; } .w-table-col-fixed-left-last::after { right: 0; left: unset; transform: translateX(100%); } .w-table-cell-text-ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .w-table-editable-row .w-table-cell-wrap-value { border: 1px solid var(--color-white); border-radius: var(--border-radius-medium); cursor: pointer; transition: all 0.1s cubic-bezier(0, 0, 1, 1); } .w-table-editable-row:hover .w-table-cell-wrap-value { border: 1px solid var(--color-neutral-3); } .w-table .w-table-expand-btn { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; padding: 0; color: var(--color-text-2); font-size: 12px; line-height: 14px; background-color: var(--color-neutral-3); border: 1px solid transparent; border-radius: 2px; outline: none; cursor: pointer; transition: background-color 0.1s cubic-bezier(0, 0, 1, 1); } .w-table .w-table-expand-btn:hover { color: var(--color-text-1); background-color: var(--color-neutral-4); border-color: transparent; } .w-table-cell-expand-icon { display: flex; align-items: center; } .w-table-cell-expand-icon .w-table-cell-inline-icon { display: inline-flex; margin-right: 4px; } .w-table-cell-expand-icon .w-table-cell-inline-icon .w-icon-loading { color: rgb(var(--primary-6)); } .w-table-cell-expand-icon-hidden { display: inline-block; width: 14px; height: 14px; margin-right: 4px; } .w-table-tr-expand .w-table-td { background-color: var(--color-fill-1); } .w-table-cell-fixed-expand { position: sticky; left: 0; box-sizing: border-box; } .w-table-tr-expand .w-table-td .w-table .w-table-container { border: none; } .w-table-tr-expand .w-table-td .w-table .w-table-th { border-bottom: 1px solid var(--color-neutral-3); } .w-table-tr-expand .w-table-td .w-table .w-table-th, .w-table-tr-expand .w-table-td .w-table .w-table-td { background-color: transparent; } .w-table-tr-expand .w-table-td .w-table .w-table-pagination { margin-bottom: 12px; } .w-table-th.w-table-operation, .w-table-td.w-table-operation { text-align: center; } .w-table-th.w-table-operation .w-table-cell, .w-table-td.w-table-operation .w-table-cell { display: flex; justify-content: center; padding: 0; } .w-table-radio, .w-table-checkbox { justify-content: center; } .w-table-checkbox .w-checkbox, .w-table-radio .w-radio { padding-left: 0; } .w-table-selection-checkbox-col, .w-table-selection-radio-col { width: 40px; min-width: 40px; max-width: 40px; } .w-table-expand-col { width: 40px; min-width: 40px; max-width: 40px; } .w-table-drag-handle-col { width: 40px; min-width: 40px; max-width: 40px; } .w-table-th { transition: background-color 0.1s cubic-bezier(0, 0, 1, 1); } .w-table-cell-with-sorter { display: flex; align-items: center; cursor: pointer; } .w-table-cell-with-sorter:hover { background-color: rgba(var(--gray-4), 0.5); } .w-table-cell-with-filter { display: flex; align-items: center; } .w-table-cell-next-ascend .w-table-sorter-icon .w-icon-caret-up { color: var(--color-neutral-6); } .w-table-cell-next-descend .w-table-sorter-icon .w-icon-caret-down { color: var(--color-neutral-6); } .w-table-sorter { display: inline-block; margin-left: 8px; vertical-align: -3px; } .w-table-sorter.w-table-sorter-direction-one { vertical-align: 0; } .w-table-sorter-icon { position: relative; width: 14px; height: 8px; overflow: hidden; line-height: 8px; } .w-table-sorter-icon .w-icon-caret-up, .w-table-sorter-icon .w-icon-caret-down { position: absolute; top: 50%; color: var(--color-neutral-5); font-size: 12px; transition: all 0.1s cubic-bezier(0, 0, 1, 1); } .w-table-sorter-icon .w-icon-caret-up { top: -2px; left: 1px; } .w-table-sorter-icon .w-icon-caret-down { top: -3px; left: 1px; } .w-table-sorter-icon.w-table-sorter-icon-active svg { color: rgb(var(--primary-6)); } .w-table-filters { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 24px; height: 100%; line-height: 1; vertical-align: 0; background-color: transparent; cursor: pointer; transition: all 0.1s cubic-bezier(0, 0, 1, 1); } .w-table-filters:hover, .w-table-filters-open { background-color: var(--color-neutral-4); } .w-table-filters svg { color: var(--color-text-2); font-size: 16px; transition: all 0.1s cubic-bezier(0, 0, 1, 1); } .w-table-filters-active svg { color: rgb(var(--primary-6)); } .w-table-filters-align-left { position: relative; width: auto; margin-left: 8px; } .w-table-filters-align-left svg { font-size: 12px; } .w-table-filters-align-left:hover, .w-table-filters-align-left-open { background: none; } .w-table-filters-align-left:hover::before, .w-table-filters-align-left.w-table-filters-open::before { background: var(--color-fill-4); } .w-table-container { position: relative; border-radius: var(--border-radius-medium) var(--border-radius-medium) 0 0; } .w-table-header { flex-shrink: 0; border-radius: var(--border-radius-medium) var(--border-radius-medium) 0 0; } .w-table-container { box-sizing: border-box; width: 100%; min-height: 0; } .w-table-container .w-table-content { display: flex; flex-direction: column; width: auto; height: 100%; } .w-table-container .w-table-content-scroll-x { overflow-x: auto; overflow-y: hidden; } .w-table-container::before, .w-table-container::after { position: absolute; z-index: 1; width: 10px; height: 100%; box-shadow: none; transition: box-shadow 0.1s cubic-bezier(0, 0, 1, 1); content: ''; pointer-events: none; } .w-table-container::before { top: 0; left: 0; border-top-left-radius: var(--border-radius-medium); } .w-table-container::after { top: 0; right: 0; border-top-right-radius: var(--border-radius-medium); } .w-table-container:not(.w-table-has-fixed-col-left).w-table-scroll-position-right::before, .w-table-container:not(.w-table-has-fixed-col-left).w-table-scroll-position-middle::before { box-shadow: inset 6px 0 8px -3px rgba(0, 0, 0, 0.15); } .w-table-container:not(.w-table-has-fixed-col-right).w-table-scroll-position-left::after, .w-table-container:not(.w-table-has-fixed-col-right).w-table-scroll-position-middle::after { box-shadow: inset -6px 0 8px -3px rgba(0, 0, 0, 0.15); } .w-table-header { overflow-x: hidden; overflow-y: hidden; background-color: var(--color-neutral-2); scrollbar-color: transparent transparent; } .w-table-header-sticky { position: sticky; top: 0; z-index: 100; } .w-table:not(.w-table-empty) .w-table-header::-webkit-scrollbar { height: 0; background-color: transparent; } .w-table.w-table-empty .w-table-header { overflow-x: auto; } .w-table-body { position: relative; width: 100%; min-height: 40px; overflow: auto; background-color: var(--color-bg-2); } .w-table-border .w-table-container { border-top: 1px solid var(--color-neutral-3); border-left: 1px solid var(--color-neutral-3); } .w-table-border .w-table-scroll-y { border-bottom: 1px solid var(--color-neutral-3); } .w-table-border .w-table-scroll-y .w-table-body .w-table-tr:last-of-type .w-table-td, .w-table-border .w-table-scroll-y tfoot .w-table-tr:last-of-type .w-table-td { border-bottom: none; } .w-table-border .w-table-scroll-y .w-table-body .w-table-tr:last-of-type .w-table-td.w-table-col-fixed-left-last::after, .w-table-border .w-table-scroll-y tfoot .w-table-tr:last-of-type .w-table-td.w-table-col-fixed-left-last::after, .w-table-border .w-table-scroll-y .w-table-body .w-table-tr:last-of-type .w-table-td.w-table-col-fixed-right-first::after, .w-table-border .w-table-scroll-y tfoot .w-table-tr:last-of-type .w-table-td.w-table-col-fixed-right-first::after { bottom: 0; } .w-table-border .w-table-tr .w-table-th { border-bottom: 1px solid var(--color-neutral-3); } .w-table-border .w-table-footer { border: 1px solid var(--color-neutral-3); border-top: 0; } .w-table-border:not(.w-table-border-cell) .w-table-container { border-right: 1px solid var(--color-neutral-3); } .w-table-border-cell .w-table-th, .w-table-border-cell .w-table-td:not(.w-table-tr-expand) { border-right: 1px solid var(--color-neutral-3); } .w-table-border-cell .w-table-th-resizing, .w-table-border-cell .w-table-td-resizing:not(.w-table-tr-expand) { border-right-color: rgb(var(--primary-6)); } .w-table-border-header-cell .w-table-th { border-right: 1px solid var(--color-neutral-3); border-bottom: 1px solid var(--color-neutral-3); } .w-table-border.w-table-border-header-cell thead .w-table-tr:first-child .w-table-th:last-child { border-right: 0; } .w-table-border-body-cell .w-table-td:not(:last-child):not(.w-table-tr-expand) { border-right: 1px solid var(--color-neutral-3); } .w-table-stripe:not(.w-table-dragging) .w-table-tr:not(.w-table-tr-empty):not(.w-table-tr-summary):nth-child(even) .w-table-td:not(.w-table-col-fixed-left):not(.w-table-col-fixed-right), .w-table-stripe .w-table-tr-drag .w-table-td:not(.w-table-col-fixed-left):not(.w-table-col-fixed-right) { background-color: var(--color-fill-1); } .w-table-stripe:not(.w-table-dragging) .w-table-tr:not(.w-table-tr-empty):not(.w-table-tr-summary):nth-child(even) .w-table-td.w-table-col-fixed-left::before, .w-table-stripe .w-table-tr-drag .w-table-td.w-table-col-fixed-left::before, .w-table-stripe:not(.w-table-dragging) .w-table-tr:not(.w-table-tr-empty):not(.w-table-tr-summary):nth-child(even) .w-table-td.w-table-col-fixed-right::before, .w-table-stripe .w-table-tr-drag .w-table-td.w-table-col-fixed-right::before { position: absolute; top: 0; left: 0; z-index: -1; width: 100%; height: 100%; background-color: var(--color-fill-1); content: ''; } .w-table .w-table-tr-draggable { cursor: move; } .w-table-hover:not(.w-table-dragging) .w-table-tr:not(.w-table-tr-empty):not(.w-table-tr-summary):hover .w-table-td:not(.w-table-col-fixed-left):not(.w-table-col-fixed-right), .w-table-hover .w-table-tr-drag .w-table-td:not(.w-table-col-fixed-left):not(.w-table-col-fixed-right) { background-color: var(--color-fill-1); } .w-table-hover:not(.w-table-dragging) .w-table-tr:not(.w-table-tr-empty):not(.w-table-tr-summary):hover .w-table-td.w-table-col-fixed-left::before, .w-table-hover .w-table-tr-drag .w-table-td.w-table-col-fixed-left::before, .w-table-hover:not(.w-table-dragging) .w-table-tr:not(.w-table-tr-empty):not(.w-table-tr-summary):hover .w-table-td.w-table-col-fixed-right::before, .w-table-hover .w-table-tr-drag .w-table-td.w-table-col-fixed-right::before { position: absolute; top: 0; left: 0; z-index: -1; width: 100%; height: 100%; background-color: var(--color-fill-1); content: ''; } .w-table-hover .w-table-tr-expand:not(.w-table-tr-empty):hover .w-table-td:not(.w-table-col-fixed-left):not(.w-table-col-fixed-right) { background-color: var(--color-fill-1); } .w-table-tr-expand .w-table-td .w-table-hover .w-table-tr:not(.w-table-tr-empty) .w-table-td:not(.w-table-col-fixed-left):not(.w-table-col-fixed-right) { background-color: transparent; } .w-table-tr-expand .w-table-td .w-table-hover .w-table-tr:not(.w-table-tr-empty) .w-table-td.w-table-col-fixed-left::before, .w-table-tr-expand .w-table-td .w-table-hover .w-table-tr:not(.w-table-tr-empty) .w-table-td.w-table-col-fixed-right::before { background-color: transparent; } .w-table-tfoot { position: relative; z-index: 1; flex-shrink: 0; width: 100%; overflow-x: auto; background-color: var(--color-neutral-2); box-shadow: 0 -1px 0 var(--color-neutral-3); scrollbar-color: transparent transparent; } .w-table-tfoot::-webkit-scrollbar { height: 0; background-color: transparent; } .w-table tfoot .w-table-td { background-color: var(--color-neutral-2); } .w-table-tr-checked .w-table-td { background-color: var(--color-fill-1); } .w-table .w-table-cell { padding: 16px 16px; } .w-table .w-table-th { font-size: 14px; } .w-table .w-table-td { font-size: 14px; } .w-table .w-table-footer { padding: 16px 16px; } .w-table .w-table-tr-expand .w-table-td .w-table { margin: -16px -16px calc(-16px - 1px) -16px; } .w-table .w-table-editable-row .w-table-cell-wrap-value { padding: 16px 16px; } .w-table-size-medium .w-table-cell { padding: 13px 16px; } .w-table-size-medium .w-table-th { font-size: 14px; } .w-table-size-medium .w-table-td { font-size: 14px; } .w-table-size-medium .w-table-footer { padding: 13px 16px; } .w-table-size-medium .w-table-tr-expand .w-table-td .w-table { margin: -13px -16px calc(-13px - 1px) -16px; } .w-table-size-medium .w-table-editable-row .w-table-cell-wrap-value { padding: 13px 16px; } .w-table-size-small .w-table-cell { padding: 6px 16px; } .w-table-size-small .w-table-th { font-size: 14px; } .w-table-size-small .w-table-td { font-size: 14px; } .w-table-size-small .w-table-footer { padding: 6px 16px; } .w-table-size-small .w-table-tr-expand .w-table-td .w-table { margin: -6px -16px calc(-6px - 1px) -16px; } .w-table-size-small .w-table-editable-row .w-table-cell-wrap-value { padding: 6px 16px; } .w-table-size-mini .w-table-cell { padding: 2px 16px; } .w-table-size-mini .w-table-th { font-size: 12px; } .w-table-size-mini .w-table-td { font-size: 12px; } .w-table-size-mini .w-table-footer { padding: 2px 16px; } .w-table-size-mini .w-table-tr-expand .w-table-td .w-table { margin: -2px -16px calc(-2px - 1px) -16px; } .w-table-size-mini .w-table-editable-row .w-table-cell-wrap-value { padding: 2px 16px; } .w-table-virtualized .w-table-element { table-layout: fixed; } .w-table-virtualized div.w-table-body div.w-table-tr { display: flex; } .w-table-virtualized div.w-table-body div.w-table-td { display: flex; flex: 1; align-items: center; } .w-table-pagination { display: flex; align-items: center; justify-content: flex-end; margin-top: 12px; } .w-table-pagination-left { justify-content: flex-start; } .w-table-pagination-center { justify-content: center; } .w-table-pagination-top { margin-top: 0; margin-bottom: 12px; }