UNPKG

wix-style-react

Version:
152 lines (130 loc) 2.66 kB
:import { -st-from: "../../Tooltip/Tooltip.st.css"; -st-default: Tooltip; } :import { -st-from: "../../common/Focusable/Focusable.st.css"; -st-default: Focusable; } :import { -st-from: '../../Foundation/stylable/colors.st.css'; -st-named: B10, B50, D60, F00; } :import { -st-from: '../../Foundation/stylable/easing.st.css'; -st-named: ease-8; } .item { -st-extends: Focusable; -st-states: clickable, size(enum(tiny, large)), alignItems(enum(start, center, end)); position: relative; display: flex; overflow: hidden; flex: 1; flex-direction: column; box-sizing: border-box; white-space: nowrap; transition: background-color .3s value(ease-8); } .item:size(tiny) { padding: 12px 24px; } .item:size(large) { padding: 18px 24px; } .item:clickable { cursor: pointer; } .item:clickable:hover { background-color: value(B50); } .item:focus { outline: none; } .item:focus-visible { border-radius: 2px; box-shadow: 0 0 0 3px value(F00); } .item:size(large):not(:first-child)::before { top: 18px; bottom: 18px; } .item:size(tiny):not(:first-child)::before { top: 12px; bottom: 12px; } .item:not(:first-child)::before { position: absolute; left: 0; width: 1px; content: ''; background-color: value(D60); transition: .3s top, bottom value(ease-8); } .item:clickable:not(:first-child):hover::before, .item:clickable:hover + .item::before { top: 0; bottom: 0; } .item:alignItems(start) { text-align: start; } .item:alignItems(center) { text-align: center; } .item:alignItems(end) { text-align: end; } .loader { -st-states: size(enum(tiny, large)), alignItems(enum(start, center, end)), ; display: flex; } .loader:size(tiny) { padding-bottom: 6px; } .loader:size(large) { padding-bottom: 12px; } .loader:alignItems(start) { justify-content: flex-start; align-items: flex-start; } .loader:alignItems(center) { justify-content: center; align-items: center; } .loader:alignItems(end) { justify-content: flex-end; align-items: flex-end; } .description { -st-states: alignItems(enum(start, center, end)); display: flex; gap: 6px; } .description:alignItems(start) { justify-content: flex-start; align-items: flex-start; } .description:alignItems(center) { justify-content: center; align-items: center; } .description:alignItems(end) { justify-content: flex-end; align-items: flex-end; } .info { display: block; color: value(B10); } .percentage { margin-top: auto; padding: 6px 13px; } .tooltip { -st-extends: Tooltip; width: auto; } /* st-namespace-reference="../../../../src/StatisticsWidget/StatisticsItem/StatisticsItem.st.css" */