@filerobot/approvals
Version:
Asset approvals package for Filerobot
86 lines • 6.02 kB
JavaScript
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
import styled, { css } from 'styled-components';
import Button from '@scaleflex/ui/core/button';
import { FV, PC } from '@filerobot/common';
import ApprovalStyled from '../../Approval/Approval.styled';
var Header = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: start;\n padding: 24px;\n gap: 24px;\n"])));
var Container = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n ", "\n"])), function (_ref) {
var noPaddings = _ref.noPaddings;
return noPaddings && "\n ".concat(Header, " {\n padding: 24px 0 0;\n }\n ");
});
var BackButton = styled(Button)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-bottom: 8px;\n\n // .SfxButton-Label { Should be done on SFX/UI side\n // ", ";\n // }\n"])), function (_ref2) {
var theme = _ref2.theme;
return theme.typography.font[FV.ButtonLgEmphasis];
});
var Section = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 100%;\n"])));
var SectionLabel = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", ";\n color: ", ";\n"])), function (_ref3) {
var theme = _ref3.theme;
return theme.typography.font[FV.LabelMedium];
}, function (_ref4) {
var theme = _ref4.theme;
return theme.palette[PC.TextSecondary];
});
var SectionContent = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", ";\n color: ", ";\n display: flex;\n flex-direction: column;\n gap: 12px;\n overflow-wrap: break-word;\n"])), function (_ref5) {
var theme = _ref5.theme;
return theme.typography.font[FV.TextExtraLarge];
}, function (_ref6) {
var theme = _ref6.theme;
return theme.palette[PC.TextPrimary];
});
var SectionContentActions = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n gap: 12px;\n\n > * {\n flex: 1;\n }\n"])));
var ApprovalsContainer = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n // overflow-y: auto;\n"])));
var ApprovalItemBody = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n gap: 12px;\n flex-grow: 1;\n align-items: flex-start;\n"])));
var ApprovalItemBodyAvatar = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n"])));
var ApprovalItemBodyContent = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", ";\n display: flex;\n flex-grow: 1;\n flex-direction: column;\n gap: 2px;\n"])), function (_ref7) {
var theme = _ref7.theme;
return theme.typography.font[FV.TextMedium];
});
var ApprovalItemBodyContentTitle = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (_ref8) {
var theme = _ref8.theme;
return theme.palette[PC.TextPrimary];
});
var ApprovalItemBodyContentDesc = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (_ref9) {
var theme = _ref9.theme;
return theme.palette[PC.TextSecondary];
});
var ApprovalItemActions = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n visibility: hidden;\n"])));
var ApprovalActions = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n gap: 2px;\n"])));
var approvalItemActiveMixin = css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n background: ", ";\n\n ", " {\n background: ", ";\n }\n\n ", " {\n visibility: visible;\n }\n"])), function (_ref10) {
var theme = _ref10.theme;
return theme.palette[PC.BackgroundHover];
}, ApprovalStyled.AvatarStatus, function (_ref11) {
var theme = _ref11.theme;
return theme.palette[PC.BackgroundHover];
}, ApprovalItemActions);
var ApprovalItem = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n padding: 8px 24px;\n gap: 16px;\n min-height: 72px;\n\n :hover { ", " }\n ", "\n"])), approvalItemActiveMixin, function (_ref12) {
var active = _ref12.active;
return active && approvalItemActiveMixin;
});
var SuccessButton = styled(Button)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n background-color: ", ";\n\n :hover, :active {\n &:not(:disabled) {\n background-color: ", ";\n }\n }\n"])), function (_ref13) {
var theme = _ref13.theme;
return theme.palette[PC.Success];
}, function (_ref14) {
var theme = _ref14.theme;
return theme.palette[PC.SuccessHover];
});
var Styled = {
Container: Container,
Header: Header,
Section: Section,
SectionLabel: SectionLabel,
SectionContent: SectionContent,
SectionContentActions: SectionContentActions,
ApprovalsContainer: ApprovalsContainer,
ApprovalItem: ApprovalItem,
ApprovalItemBody: ApprovalItemBody,
ApprovalItemBodyAvatar: ApprovalItemBodyAvatar,
ApprovalItemBodyContent: ApprovalItemBodyContent,
ApprovalItemBodyContentTitle: ApprovalItemBodyContentTitle,
ApprovalItemBodyContentDesc: ApprovalItemBodyContentDesc,
ApprovalItemActions: ApprovalItemActions,
ApprovalActions: ApprovalActions,
SuccessButton: SuccessButton,
BackButton: BackButton
};
export default Styled;