@up-group-ui/react-controls
Version:
Up shared react controls
84 lines • 3.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TooltipCircularProgressStyle = exports.LabelCircularProgressStyle = exports.DefaultWrapperValueLabelStyle = exports.DefaultUniteStyle = exports.DefaultValueLabelStyle = exports.WrapperCircularProgressStyle = exports.CompletedCircularProgressStyle = exports.CircularProgressStyle = exports.body1CenterGreyLevel1 = exports.body1RightGreyLevel1 = exports.display1LeftGreyLevel1 = void 0;
var tslib_1 = require("tslib");
var typestyle_1 = require("typestyle");
var theming_1 = require("../../../Common/theming/");
var utils_1 = require("../../../Common/theming/utils");
exports.display1LeftGreyLevel1 = {
fontFamily: 'Roboto',
fontWeight: 500,
textAlign: 'left',
color: theming_1.UpThemeColorMap.gray1,
};
exports.body1RightGreyLevel1 = {
fontFamily: 'Roboto',
textAlign: 'left',
color: theming_1.UpThemeColorMap.gray1,
};
exports.body1CenterGreyLevel1 = {
fontFamily: 'Roboto',
fontSize: '1vw',
textAlign: 'center',
color: theming_1.UpThemeColorMap.gray1,
};
exports.CircularProgressStyle = (0, typestyle_1.style)({
position: 'absolute',
top: 0,
left: 0,
});
exports.CompletedCircularProgressStyle = (0, typestyle_1.style)({
zIndex: 5,
});
exports.WrapperCircularProgressStyle = (0, typestyle_1.style)({
position: 'relative',
display: 'block',
margin: 'auto',
$nest: {
'&:after': {},
svg: {
position: 'absolute',
top: 0,
left: 0,
transform: 'rotate(-90deg)',
},
'& svg > circle': {
strokeDasharray: [0],
transition: 'all 1s linear',
},
},
});
var DefaultValueLabelStyle = function (props) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, exports.display1LeftGreyLevel1), { $nest: {
'.up-progress-value': {
fontSize: (0, utils_1.toRem)(props.size / 6),
marginRight: (0, utils_1.toRem)(2),
},
'.up-progress-value-max': {
fontSize: (0, utils_1.toRem)(props.size / 7),
},
} })); };
exports.DefaultValueLabelStyle = DefaultValueLabelStyle;
var DefaultUniteStyle = function (props) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, exports.display1LeftGreyLevel1), { fontSize: (0, utils_1.toRem)(props.size / 7) })); };
exports.DefaultUniteStyle = DefaultUniteStyle;
exports.DefaultWrapperValueLabelStyle = (0, typestyle_1.style)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, exports.body1RightGreyLevel1), { marginBottom: (0, utils_1.toRem)(8), textAlign: 'center' }));
var LabelCircularProgressStyle = function (props) {
var fullSize = props.size + 20;
return (0, typestyle_1.style)({
position: 'absolute',
top: (0, utils_1.toRem)(fullSize / 2 - fullSize / 8 + 10),
left: (0, utils_1.toRem)(props.thickness + fullSize / 10 + 5),
right: 0,
width: (0, utils_1.toRem)(fullSize - props.thickness + 2 - fullSize / 10),
textAlign: 'center',
});
};
exports.LabelCircularProgressStyle = LabelCircularProgressStyle;
var TooltipCircularProgressStyle = function (props) {
return (0, typestyle_1.style)({
width: '100%',
textAlign: 'center',
padding: (0, utils_1.toRem)(8),
});
};
exports.TooltipCircularProgressStyle = TooltipCircularProgressStyle;
//# sourceMappingURL=styles.js.map