UNPKG

@stokr/components-library

Version:

STOKR - Components Library

110 lines (109 loc) 11.3 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Wrapper = exports.SuccessMark = exports.RetakeButton = exports.Mask = exports.HeaderTitle = exports.HeaderButtonWrapper = exports.Header = exports.FormBottomRow = exports.FormBottomButtonWrap = exports.FileInputWrapper = exports.FileInputRemove = exports.FileInputList = exports.FileInputItem = exports.FileInput = exports.DoneButton = exports.ColumnInner = exports.BottomWrapper = exports.BodyTitle = exports.Body = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _rwd = _interopRequireDefault(require("../../styles/rwd")); var _Button = _interopRequireDefault(require("../Button/Button.styles")); var _Form = require("../Form/Form"); var _Grid = require("../Grid/Grid.styles"); var _Text = _interopRequireDefault(require("../Text/Text.styles")); var _Icon = _interopRequireWildcard(require("../Icon/Icon.style")); var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7; function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } const Wrapper = exports.Wrapper = _styledComponents.default.div.withConfig({ displayName: "_styles__Wrapper", componentId: "sc-10twwzl-0" })(["height:100%;display:flex;flex-direction:column;padding:33px 0;", "{p{", "}}"], _Text.default, _rwd.default.XLarge(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 16px;\n "])))); const Header = exports.Header = _styledComponents.default.div.withConfig({ displayName: "_styles__Header", componentId: "sc-10twwzl-1" })(["min-height:82px;display:flex;flex-wrap:wrap;padding:12px 24px;flex-shrink:0;", ""], _rwd.default.Large(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 21px 64px;\n "])))); const HeaderTitle = exports.HeaderTitle = _styledComponents.default.div.withConfig({ displayName: "_styles__HeaderTitle", componentId: "sc-10twwzl-2" })(["font-family:'Open Sans';font-weight:800;font-size:22px;line-height:1.27em;letter-spacing:0.8px;text-transform:uppercase;", ""], props => props.withMargin && 'margin-top: 16px;'); const HeaderButtonWrapper = exports.HeaderButtonWrapper = _styledComponents.default.div.withConfig({ displayName: "_styles__HeaderButtonWrapper", componentId: "sc-10twwzl-3" })(["margin:0 auto;padding:8px 0;& > *{display:inline-block !important;}", " ", "", "", "{margin-right:16px;&:last-child{margin-right:0;}}"], _rwd.default.Large(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: 0;\n "]))), _Button.default, _Button.default, _Button.default); const Body = exports.Body = _styledComponents.default.div.withConfig({ displayName: "_styles__Body", componentId: "sc-10twwzl-4" })(["padding:21px 24px;height:100%;display:flex;flex-direction:column;justify-content:center;overflow-y:auto;@media screen and (max-width:767px){display:flex;justify-content:space-between;padding:0;}", " ", " ", ""], props => props.noVerticalPadding && "\n padding-top: 0!important;\n padding-bottom: 0!important;\n ", props => props.noHorizontalPadding && "\n padding-left: 0;\n padding-right: 0;\n ", props => props.form && (0, _styledComponents.css)(["padding:21px 48px;justify-content:flex-start;", "{flex-shrink:0;}"], _Grid.Row)); const BottomWrapper = exports.BottomWrapper = _styledComponents.default.div.withConfig({ displayName: "_styles__BottomWrapper", componentId: "sc-10twwzl-5" })(["", "{display:flex;justify-content:space-between;flex-direction:column;", " + ", "{padding-top:32px;", "}", "{white-space:nowrap;padding-left:28px;}}"], _Form.FormField, _rwd.default.Medium(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: middle;\n margin-right: 44px;\n "]))), _Form.FormField, _rwd.default.Medium(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-top: 0;\n "]))), _Form.FormError); const BodyTitle = exports.BodyTitle = _styledComponents.default.div.withConfig({ displayName: "_styles__BodyTitle", componentId: "sc-10twwzl-6" })(["text-align:center;margin:0 auto;font-size:11px;font-weight:bold;line-height:1.82;letter-spacing:2px;", ""], props => props.faceScan && "\n margin-top: 20px;\n "); const ColumnInner = exports.ColumnInner = _styledComponents.default.div.withConfig({ displayName: "_styles__ColumnInner", componentId: "sc-10twwzl-7" })(["display:flex;flex-direction:column;align-items:center;height:100%;", " ", " ", " ", " ", " ", " ", ""], props => props.verticalPadding && "\n padding-top: 40px;\n padding-bottom: 40px;\n ", props => props.horizontalPadding && "\n padding-left: 36px;\n padding-right: 36px;\n ", props => props.formInner && "\n padding-left: 18px;\n padding-right: 18px;\n align-items: stretch;\n ", props => props.withSeparator && "\n border-bottom: 1px solid ".concat(props.theme.cLightGrey, ";\n "), props => props.verticalCenter && "\n justify-content: center;\n ", props => props.verticalSpaceAround && "\n justify-content: space-around;\n ", _rwd.default.Medium(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n "])), props => props.withSeparator && "\n border-bottom: 0;\n border-right: 1px solid ".concat(props.theme.cLightGrey, ";\n "))); const FileInput = exports.FileInput = _styledComponents.default.input.attrs(props => _objectSpread({ type: 'file' }, props)).withConfig({ displayName: "_styles__FileInput", componentId: "sc-10twwzl-8" })(["visibility:hidden;position:absolute;width:0.1px;height:0.1px;z-index:-1;"]); const FileInputWrapper = exports.FileInputWrapper = (0, _styledComponents.default)(_Button.default).attrs({ as: 'label', type: undefined }).withConfig({ displayName: "_styles__FileInputWrapper", componentId: "sc-10twwzl-9" })(["position:relative;word-break:break-all;"]); const FileInputRemove = exports.FileInputRemove = (0, _styledComponents.default)(_Icon.default).attrs({ icon: _Icon.iconsMap.trash }).withConfig({ displayName: "_styles__FileInputRemove", componentId: "sc-10twwzl-10" })(["position:absolute;top:50%;right:0px;transform:translateY(-50%);font-size:16px;cursor:pointer;transition:0.3s color;color:", ";border-radius:50%;border:1px solid ", ";padding:10px;&:hover{color:", ";}"], props => props.theme.cWarning, props => props.theme.cLightGrey, props => props.theme.cPrimary); const SuccessMark = exports.SuccessMark = (0, _styledComponents.default)(_Icon.default).attrs({ icon: _Icon.iconsMap.check }).withConfig({ displayName: "_styles__SuccessMark", componentId: "sc-10twwzl-11" })(["width:40px;height:40px;border-radius:50%;display:flex !important;justify-content:center;align-items:center;color:", ";margin:auto;font-size:18px;", ""], props => props.theme.cSuccess, props => props.isHidden && "\n opacity: 0;\n "); const FileInputList = exports.FileInputList = _styledComponents.default.ul.withConfig({ displayName: "_styles__FileInputList", componentId: "sc-10twwzl-12" })(["list-style-type:none;padding:0;font-size:12px;width:100%;"]); const FileInputItem = exports.FileInputItem = _styledComponents.default.li.withConfig({ displayName: "_styles__FileInputItem", componentId: "sc-10twwzl-13" })(["padding:0 46px 0 8px;margin-right:8px;position:relative;word-break:break-all;"]); const DocumentScanButtonsStyle = (0, _styledComponents.css)(["width:40px;height:40px;margin-top:20px;margin-bottom:10px;border-radius:50%;background:", ";color:", ";display:flex !important;justify-content:center;align-items:center;font-size:18px;& > svg{fill:", ";stroke:", ";}"], props => props.theme.cPrimary, props => props.theme.cWhite, props => props.theme.cWhite, props => props.theme.cWhite); const RetakeButton = exports.RetakeButton = _styledComponents.default.button.withConfig({ displayName: "_styles__RetakeButton", componentId: "sc-10twwzl-14" })(["", ";& > svg{width:22px !important;height:23px !important;}"], DocumentScanButtonsStyle); const DoneButton = exports.DoneButton = _styledComponents.default.button.attrs({ className: 'ion ion-md-checkmark' }).withConfig({ displayName: "_styles__DoneButton", componentId: "sc-10twwzl-15" })(["", ";"], DocumentScanButtonsStyle); const Mask = exports.Mask = _styledComponents.default.div.withConfig({ displayName: "_styles__Mask", componentId: "sc-10twwzl-16" })(["width:100%;height:100%;background:rgba(201,255,233,0.6);position:relative;"]); const FormBottomRow = exports.FormBottomRow = (0, _styledComponents.default)(_Grid.Row).withConfig({ displayName: "_styles__FormBottomRow", componentId: "sc-10twwzl-17" })(["padding-left:18px;padding-right:18px;padding-top:64px;"]); const FormBottomButtonWrap = exports.FormBottomButtonWrap = _styledComponents.default.div.withConfig({ displayName: "_styles__FormBottomButtonWrap", componentId: "sc-10twwzl-18" })(["padding-top:32px;margin:auto;", ""], _rwd.default.Medium(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding-top: 0;\n margin-right: 0;\n "]))));