UNPKG

kwikid-components-react

Version:

KwikID's Component Library in React

47 lines (46 loc) 4.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.KwikUIStyleDialogWrapper = exports.KwikUIStyleDialogContainer = exports.KwikUIStyleDialogChildren = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _Dialog = require("./Dialog.definition"); var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0; 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 _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } const KwikUIStyleDialogContainer = exports.KwikUIStyleDialogContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.6);\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: center;\n align-items: center;\n grid-gap: 1rem;\n gap: 1rem;\n z-index: 99999;\n position: relative;\n\n ", "\n"])), _ref => { let { variant } = _ref; return variant === "fullscreen" && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n "]))); }); const KwikUIStyleDialogWrapper = exports.KwikUIStyleDialogWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: center;\n align-items: center;\n background-color: white;\n box-shadow:\n rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,\n rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n border-radius: 0.5rem;\n z-index: 99999;\n max-width: 90%;\n max-height: 90%;\n overflow: auto;\n\n ", "\n\n ", "\n"])), _ref2 => { let { variant, size } = _ref2; switch (variant) { case _Dialog.IKwikUIDialogVariant.CONTAINED: switch (size) { case _Dialog.IKwikUIDialogSize.S: return (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: var(--kwikui-space-s);\n "]))); case _Dialog.IKwikUIDialogSize.M: return (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: var(--kwikui-space-m);\n "]))); case _Dialog.IKwikUIDialogSize.L: return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin: var(--kwikui-space-l);\n "]))); } } }, _ref3 => { let { shape } = _ref3; switch (shape) { case _Dialog.IKwikUIDialogShape.ROUNDED: return (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-radius: 2em;\n "]))); case _Dialog.IKwikUIDialogShape.CURVED: return (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n border-radius: 0.5em;\n "]))); case _Dialog.IKwikUIDialogShape.RECTANGLE: return (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n border-radius: 0em;\n "]))); } }); const KwikUIStyleDialogChildren = exports.KwikUIStyleDialogChildren = _styledComponents.default.div(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral([""])));