UNPKG

@arche-mc2/arche-controls

Version:

We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get

113 lines 4.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var classnames = require("classnames"); var typestyle_1 = require("typestyle"); var utils_1 = require("../../../Common/theming/utils"); exports.colors = function (props) { return { position: 'relative', backgroundColor: props.displayMode === 'text' ? 'transparent' : props.theme.colorMap["" + props.intent] || props.theme.colorMap.white3, color: props.theme.colorMap[props.intent + "Dark"] || props.theme.colorMap.darkGray5, borderRadius: props.displayMode === 'text' ? 0 : props.theme.borderRadius, $nest: { '& p, & span, & div, & em, & strong': { fontWeight: 400, textAlign: 'left', color: props.displayMode === 'text' ? props.theme.colorMap["" + props.intent] : props.theme.colorMap.white1 || props.theme.colorMap.darkGray5 } } }; }; exports.icon = function (props) { var iconContainerStyle = { marginLeft: utils_1.toRem(25) }; return { $nest: { '& .up-notification .up-notification-icon-container': tslib_1.__assign({}, iconContainerStyle), '& .up-notification .colored svg, & .up-notification .colored svg path, & .up-notification .colored svg polygon, & .up-notification .colored svg polyline': { fill: props.displayMode === 'text' ? props.theme.colorMap["" + props.intent] : props.theme.colorMap.white1, display: 'inline-block', background: 'unset !important' }, '& .up-notification .cancel-icon': { position: 'absolute', top: utils_1.toRem(10), right: utils_1.toRem(10), cursor: 'pointer' }, '& .up-notification .cancel-icon svg path': { fill: props.theme.colorMap.white1 } } }; }; exports.text = function (props) { return { $nest: { '& .up-notification .up-notification-message': { marginLeft: utils_1.toRem(25), whiteSpace: 'pre-line' } } }; }; exports.progressBar = function (props) { var progress = typestyle_1.keyframes({ from: { width: '0%' }, to: { width: '100%' } }); return { $nest: { '& .up-notification-progress-bar-container': { position: 'absolute', backgroundColor: props.theme.colorMap.grey1, width: '100%', borderBottomRightRadius: '4px', borderBottomLeftRadius: '4px', bottom: 0, right: 0 }, '& .up-notification-progress-bar': { width: '100%', height: '4px', animationPlayState: 'running', animation: progress + " " + props.durationBeforeClosing + "s", backgroundColor: props.theme.colorMap.gray6, borderBottomRightRadius: '4px', borderBottomLeftRadius: '4px' }, '&.up-notification-container:hover .up-notification-progress-bar': { animationPlayState: 'paused' }, '&.up-notification-container': { borderRadius: '0 0 4px 4px' } } }; }; exports.getStyles = function (props) { return classnames(typestyle_1.style(exports.colors(props)), typestyle_1.style(exports.icon(props)), typestyle_1.style(exports.text(props)), typestyle_1.style(exports.progressBar(props)), typestyle_1.style({ width: '100%', padding: props.title ? utils_1.toRem(28) + " " + utils_1.toRem(8) : utils_1.toRem(8), borderRadius: '4px', boxSizing: 'border-box', minHeight: utils_1.toRem(100), overflow: 'hidden', display: 'flex', alignItems: 'center', })); }; //# sourceMappingURL=styles.js.map