UNPKG

styled-base-components

Version:

The bootstrap base components created with styled-components

1,144 lines (852 loc) 32.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Utilities = void 0; var _styledComponents = require("styled-components"); var _styledConfig = require("styled-config"); function _templateObject55() { var data = _taggedTemplateLiteral(["\n @media (min-width: ", ") {\n ", ";\n }\n "]); _templateObject55 = function _templateObject55() { return data; }; return data; } function _templateObject54() { var data = _taggedTemplateLiteral(["\n ", ";\n\n ", ";\n\n ", ";\n"]); _templateObject54 = function _templateObject54() { return data; }; return data; } function _templateObject53() { var data = _taggedTemplateLiteral(["\n ", ";\n ", ";\n ", ";\n "]); _templateObject53 = function _templateObject53() { return data; }; return data; } function _templateObject52() { var data = _taggedTemplateLiteral(["\n ", ";\n ", ";\n\n ", ";\n\n ", ";\n ", "\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n\n ", ";\n ", ";\n ", ";\n\n ", ";\n ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n"]); _templateObject52 = function _templateObject52() { return data; }; return data; } function _templateObject51() { var data = _taggedTemplateLiteral(["\n display: block;\n content: \"\";\n clear: both;\n "]); _templateObject51 = function _templateObject51() { return data; }; return data; } function _templateObject50() { var data = _taggedTemplateLiteral(["\n ", "\n"]); _templateObject50 = function _templateObject50() { return data; }; return data; } function _templateObject49() { var data = _taggedTemplateLiteral(["\n display: ", ";\n"]); _templateObject49 = function _templateObject49() { return data; }; return data; } function _templateObject48() { var data = _taggedTemplateLiteral(["\n resize: ", ";\n"]); _templateObject48 = function _templateObject48() { return data; }; return data; } function _templateObject47() { var data = _taggedTemplateLiteral(["\n visibility: ", ";\n"]); _templateObject47 = function _templateObject47() { return data; }; return data; } function _templateObject46() { var data = _taggedTemplateLiteral(["\n flex-wrap: ", ";\n"]); _templateObject46 = function _templateObject46() { return data; }; return data; } function _templateObject45() { var data = _taggedTemplateLiteral(["\n flex-shrink: ", ";\n"]); _templateObject45 = function _templateObject45() { return data; }; return data; } function _templateObject44() { var data = _taggedTemplateLiteral(["\n flex-grow: ", ";\n"]); _templateObject44 = function _templateObject44() { return data; }; return data; } function _templateObject43() { var data = _taggedTemplateLiteral(["\n order: ", ";\n "]); _templateObject43 = function _templateObject43() { return data; }; return data; } function _templateObject42() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject42 = function _templateObject42() { return data; }; return data; } function _templateObject41() { var data = _taggedTemplateLiteral(["\n align-content: ", ";\n"]); _templateObject41 = function _templateObject41() { return data; }; return data; } function _templateObject40() { var data = _taggedTemplateLiteral(["\n align-self: ", ";\n"]); _templateObject40 = function _templateObject40() { return data; }; return data; } function _templateObject39() { var data = _taggedTemplateLiteral(["\n align-items: ", ";\n"]); _templateObject39 = function _templateObject39() { return data; }; return data; } function _templateObject38() { var data = _taggedTemplateLiteral(["\n justify-content: ", ";\n"]); _templateObject38 = function _templateObject38() { return data; }; return data; } function _templateObject37() { var data = _taggedTemplateLiteral(["\n flex-direction: ", ";\n"]); _templateObject37 = function _templateObject37() { return data; }; return data; } function _templateObject36() { var data = _taggedTemplateLiteral(["\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n "]); _templateObject36 = function _templateObject36() { return data; }; return data; } function _templateObject35() { var data = _taggedTemplateLiteral(["\n margin-left: ", ";\n margin-right: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n "]); _templateObject35 = function _templateObject35() { return data; }; return data; } function _templateObject34() { var data = _taggedTemplateLiteral(["\n border-radius: ", ";\n"]); _templateObject34 = function _templateObject34() { return data; }; return data; } function _templateObject33() { var data = _taggedTemplateLiteral(["\n border-radius: ", ";\n"]); _templateObject33 = function _templateObject33() { return data; }; return data; } function _templateObject32() { var data = _taggedTemplateLiteral(["\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n"]); _templateObject32 = function _templateObject32() { return data; }; return data; } function _templateObject31() { var data = _taggedTemplateLiteral(["\n border-color: ", ";\n "]); _templateObject31 = function _templateObject31() { return data; }; return data; } function _templateObject30() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject30 = function _templateObject30() { return data; }; return data; } function _templateObject29() { var data = _taggedTemplateLiteral(["\n border-color: ", ";\n "]); _templateObject29 = function _templateObject29() { return data; }; return data; } function _templateObject28() { var data = _taggedTemplateLiteral(["\n border-left: ", ";\n border-right: ", ";\n border-top: ", ";\n border-bottom: ", ";\n\n ", ";\n "]); _templateObject28 = function _templateObject28() { return data; }; return data; } function _templateObject27() { var data = _taggedTemplateLiteral(["\n background-color: ", ";\n "]); _templateObject27 = function _templateObject27() { return data; }; return data; } function _templateObject26() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject26 = function _templateObject26() { return data; }; return data; } function _templateObject25() { var data = _taggedTemplateLiteral(["\n color: ", ";\n "]); _templateObject25 = function _templateObject25() { return data; }; return data; } function _templateObject24() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject24 = function _templateObject24() { return data; }; return data; } function _templateObject23() { var data = _taggedTemplateLiteral(["\n float: ", ";\n"]); _templateObject23 = function _templateObject23() { return data; }; return data; } function _templateObject22() { var data = _taggedTemplateLiteral(["\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n "]); _templateObject22 = function _templateObject22() { return data; }; return data; } function _templateObject21() { var data = _taggedTemplateLiteral(["\n ", "\n"]); _templateObject21 = function _templateObject21() { return data; }; return data; } function _templateObject20() { var data = _taggedTemplateLiteral(["\n display: none;\n "]); _templateObject20 = function _templateObject20() { return data; }; return data; } function _templateObject19() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject19 = function _templateObject19() { return data; }; return data; } function _templateObject18() { var data = _taggedTemplateLiteral(["\n overflow: ", ";\n"]); _templateObject18 = function _templateObject18() { return data; }; return data; } function _templateObject17() { var data = _taggedTemplateLiteral(["\n position: ", ";\n"]); _templateObject17 = function _templateObject17() { return data; }; return data; } function _templateObject16() { var data = _taggedTemplateLiteral(["\n box-shadow: ", ";\n"]); _templateObject16 = function _templateObject16() { return data; }; return data; } function _templateObject15() { var data = _taggedTemplateLiteral(["\n ", "", ": ", ";\n "]); _templateObject15 = function _templateObject15() { return data; }; return data; } function _templateObject14() { var data = _taggedTemplateLiteral(["", ""]); _templateObject14 = function _templateObject14() { return data; }; return data; } function _templateObject13() { var data = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n "]); _templateObject13 = function _templateObject13() { return data; }; return data; } function _templateObject12() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject12 = function _templateObject12() { return data; }; return data; } function _templateObject11() { var data = _taggedTemplateLiteral(["\n word-break: break-word;\n overflow-wrap: break-word;\n "]); _templateObject11 = function _templateObject11() { return data; }; return data; } function _templateObject10() { var data = _taggedTemplateLiteral(["\n ", ";\n"]); _templateObject10 = function _templateObject10() { return data; }; return data; } function _templateObject9() { var data = _taggedTemplateLiteral(["\n text-decoration: ", ";\n"]); _templateObject9 = function _templateObject9() { return data; }; return data; } function _templateObject8() { var data = _taggedTemplateLiteral(["\n color: ", ";\n"]); _templateObject8 = function _templateObject8() { return data; }; return data; } function _templateObject7() { var data = _taggedTemplateLiteral(["\n font-family: ", ";\n"]); _templateObject7 = function _templateObject7() { return data; }; return data; } function _templateObject6() { var data = _taggedTemplateLiteral(["\n font-style: ", ";\n"]); _templateObject6 = function _templateObject6() { return data; }; return data; } function _templateObject5() { var data = _taggedTemplateLiteral(["\n font-weight: ", ";\n"]); _templateObject5 = function _templateObject5() { return data; }; return data; } function _templateObject4() { var data = _taggedTemplateLiteral(["\n text-transform: ", ";\n"]); _templateObject4 = function _templateObject4() { return data; }; return data; } function _templateObject3() { var data = _taggedTemplateLiteral(["\n white-space: ", ";\n"]); _templateObject3 = function _templateObject3() { return data; }; return data; } function _templateObject2() { var data = _taggedTemplateLiteral(["\n text-align: ", ";\n"]); _templateObject2 = function _templateObject2() { return data; }; return data; } function _templateObject() { var data = _taggedTemplateLiteral(["\n vertical-align: ", ";\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } /* Constants and helpers */ var capitalizeFirstLetter = function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); }; var colors = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'darker', 'white', 'transparent']; /* Vertical align --------------------------------------------------------- */ var verticalAlign = function verticalAlign(size) { return (0, _styledComponents.css)(_templateObject(), function (props) { if (props["text".concat(size, "Baseline")]) { return 'baseline'; } if (props["text".concat(size, "Top")]) { return 'top'; } if (props["text".concat(size, "Bottom")]) { return 'bottom'; } if (props["text".concat(size, "TextTop")]) { return 'text-top'; } if (props["text".concat(size, "TextBottom")]) { return 'text-bottom'; } return null; }); }; /* Text ------------------------------------------------------------------- */ var textAlign = function textAlign(size) { return (0, _styledComponents.css)(_templateObject2(), function (props) { if (props["text".concat(size, "Justify")]) { return 'justify'; } if (props["text".concat(size, "Left")]) { return 'left'; } if (props["text".concat(size, "Right")]) { return 'right'; } if (props["text".concat(size, "Center")]) { return 'center'; } return null; }); }; var textWrap = function textWrap(size) { return (0, _styledComponents.css)(_templateObject3(), function (props) { if (props["text".concat(size, "Wrap")]) { return 'normal'; } if (props["text".concat(size, "NoWrap")]) { return 'nowrap'; } return null; }); }; var textTransform = function textTransform(size) { return (0, _styledComponents.css)(_templateObject4(), function (props) { if (props["text".concat(size, "Lowercase")]) { return 'lowercase'; } if (props["text".concat(size, "Uppercase")]) { return 'uppercase'; } if (props["text".concat(size, "Capitalize")]) { return 'capitalize'; } return null; }); }; var textWeight = function textWeight(size) { return (0, _styledComponents.css)(_templateObject5(), function (props) { if (props["text".concat(size, "WeightBold")]) { return 'bold'; } if (props["text".concat(size, "WeightBolder")]) { return 'bolder'; } if (props["text".concat(size, "WeightNormal")]) { return 'normal'; } if (props["text".concat(size, "WeightLight")]) { return 'light'; } if (props["text".concat(size, "WeightLighter")]) { return 'lighter'; } return null; }); }; var textStyle = function textStyle(size) { return (0, _styledComponents.css)(_templateObject6(), function (props) { if (props["text".concat(size, "Italic")]) { return 'italic'; } return null; }); }; var textMonospace = function textMonospace(size) { return (0, _styledComponents.css)(_templateObject7(), function (props) { if (props["text".concat(size, "Monospace")]) { return 'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'; } return null; }); }; var textReset = function textReset(size) { return (0, _styledComponents.css)(_templateObject8(), function (props) { if (props["text".concat(size, "Reset")]) { return 'inherit'; } return null; }); }; var textDecoration = function textDecoration(size) { return (0, _styledComponents.css)(_templateObject9(), function (props) { if (props["textDecoration".concat(size, "None")]) { return 'none!important'; } return null; }); }; var textWordBreak = function textWordBreak(size) { return (0, _styledComponents.css)(_templateObject10(), function (props) { if (props["text".concat(size, "WordBreak")]) { return (0, _styledComponents.css)(_templateObject11()); } return null; }); }; var textTruncate = function textTruncate(size) { return (0, _styledComponents.css)(_templateObject12(), function (props) { if (props["text".concat(size, "Truncate")]) { return (0, _styledComponents.css)(_templateObject13()); } return null; }); }; /* Sizing ----------------------------------------------------------------- */ var sizing = function sizing(size) { return ['max-', ''].map(function (m) { return ['width', 'height'].map(function (a) { return ['25', '50', '75', '100', 'Auto'].map(function (p) { return (0, _styledComponents.css)(_templateObject14(), function (props) { return props["".concat(m.slice(0, 1)).concat(a[0]).concat(size).concat(p)] && (0, _styledComponents.css)(_templateObject15(), m, a, p === 'Auto' ? 'auto' : "".concat(p, "%")); }); }); }); }); }; /* Shadows ---------------------------------------------------------------- */ var shadow = function shadow(size) { return (0, _styledComponents.css)(_templateObject16(), function (props) { if (props["shadow".concat(size, "None")]) { return 'none'; } if (props["shadow".concat(size, "Small")]) { return '0 .25rem .5rem rgba(0,0,0,.1)'; } if (props["shadow".concat(size)]) { return '0 .75rem 1.5rem rgba(0,0,0,.2)'; } if (props["shadow".concat(size, "Large")]) { return '0 1.25rem 3.5rem rgba(0,0,0,.25)'; } return null; }); }; /* Position --------------------------------------------------------------- */ var position = function position(size) { return (0, _styledComponents.css)(_templateObject17(), function (props) { if (props["position".concat(size, "Static")]) { return 'static'; } if (props["position".concat(size, "Relative")]) { return 'relative'; } if (props["position".concat(size, "Absolute")]) { return 'absolute'; } if (props["position".concat(size, "Fixed")]) { return 'fixed'; } if (props["position".concat(size, "Sticky")]) { return 'sticky'; } return null; }); }; /* Overflow --------------------------------------------------------------- */ var overflow = function overflow(size) { return (0, _styledComponents.css)(_templateObject18(), function (props) { if (props["overflow".concat(size, "Auto")]) { return 'auto'; } if (props["overflow".concat(size, "Hidden")]) { return 'hidden'; } return null; }); }; /* Hidden ----------------------------------------------------------------- */ var hidden = function hidden() { return (0, _styledComponents.css)(_templateObject19(), function (props) { if (props.hidden) { return (0, _styledComponents.css)(_templateObject20()); } return null; }); }; /* Text hide ------------------------------------------------------------- */ var textHide = function textHide(size) { return (0, _styledComponents.css)(_templateObject21(), function (props) { if (props["text".concat(size, "Hide")]) { return (0, _styledComponents.css)(_templateObject22()); } return null; }); }; /* Float ----------------------------------------------------------------- */ var float = function float(size) { return (0, _styledComponents.css)(_templateObject23(), function (props) { if (props["float".concat(size, "Right")]) { return 'right'; } if (props["float".concat(size, "Left")]) { return 'left'; } if (props["float".concat(size, "None")]) { return 'none'; } return null; }); }; /* Colors ---------------------------------------------------------------- */ var textColors = function textColors(size) { return (0, _styledComponents.css)(_templateObject24(), function (props) { return colors.map(function (color) { return props["text".concat(size).concat(capitalizeFirstLetter(color))] && (0, _styledComponents.css)(_templateObject25(), (props.theme.colorScheme || _styledConfig.theme.colorScheme)[color]); }); }); }; var backgroundColors = function backgroundColors(size) { return (0, _styledComponents.css)(_templateObject26(), function (props) { return colors.map(function (color) { return props["bg".concat(size).concat(capitalizeFirstLetter(color))] && (0, _styledComponents.css)(_templateObject27(), (props.theme.colorScheme || _styledConfig.theme.colorScheme)[color]); }); }); }; /* Borders ---------------------------------------------------------------- */ var normalizeBorderValue = function normalizeBorderValue(value) { if (value === '0') { return '0'; } return '1px solid'; }; var border = function border(size, value) { var suffix = "".concat(size).concat(value); return (0, _styledComponents.css)(_templateObject28(), function (props) { return (props["borderLeft".concat(suffix)] || props["border".concat(suffix)]) && normalizeBorderValue(value); }, function (props) { return (props["borderRight".concat(suffix)] || props["border".concat(suffix)]) && normalizeBorderValue(value); }, function (props) { return (props["borderTop".concat(suffix)] || props["border".concat(suffix)]) && normalizeBorderValue(value); }, function (props) { return (props["borderBottom".concat(suffix)] || props["border".concat(suffix)]) && normalizeBorderValue(value); }, function (props) { return colors.map(function (color) { return props["border".concat(size).concat(capitalizeFirstLetter(color))] && (0, _styledComponents.css)(_templateObject29(), (props.theme.colorScheme || _styledConfig.theme.colorScheme)[color]); }); }); }; var borderColor = function borderColor(size) { return (0, _styledComponents.css)(_templateObject30(), function (props) { return colors.map(function (color) { return props["border".concat(size).concat(capitalizeFirstLetter(color))] && (0, _styledComponents.css)(_templateObject31(), (props.theme.colorScheme || _styledConfig.theme.colorScheme)[color]); }); }); }; var rounded = function rounded(size) { return (0, _styledComponents.css)(_templateObject32(), function (props) { return props["roundedTop".concat(size)] || props["roundedLeft".concat(size)] || props["rounded".concat(size)] ? '.25rem' : null; }, function (props) { return props["roundedTop".concat(size)] || props["roundedRight".concat(size)] || props["rounded".concat(size)] ? '.25rem' : null; }, function (props) { return props["roundedBottom".concat(size)] || props["roundedLeft".concat(size)] || props["rounded".concat(size)] ? '.25rem' : null; }, function (props) { return props["roundedBottom".concat(size)] || props["roundedRight".concat(size)] || props["rounded".concat(size)] ? '.25rem' : null; }); }; var roundedCircle = function roundedCircle(size) { return (0, _styledComponents.css)(_templateObject33(), function (props) { return props["rounded".concat(size, "Circle")] ? '50%' : null; }); }; var roundedPill = function roundedPill(size) { return (0, _styledComponents.css)(_templateObject34(), function (props) { return props["rounded".concat(size, "Pill")] ? '50rem' : null; }); }; /* Spacing ---------------------------------------------------------------- */ var normalizeSpacingValue = function normalizeSpacingValue(value) { var allowAuto = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; // allowed value if (allowAuto && value === 'Auto') { return 'auto'; } // rem value return "".concat(value * 0.25, "rem"); }; // Margin var spacingMargin = function spacingMargin(size, value) { var negative = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var suffix = "".concat(size).concat(negative ? 'n' : '').concat(value); var val = negative ? -value : value; return (0, _styledComponents.css)(_templateObject35(), function (props) { return (props["ml".concat(suffix)] || props["mx".concat(suffix)] || props["m".concat(suffix)]) && normalizeSpacingValue(val, true); }, function (props) { return (props["mr".concat(suffix)] || props["mx".concat(suffix)] || props["m".concat(suffix)]) && normalizeSpacingValue(val, true); }, function (props) { return (props["mt".concat(suffix)] || props["my".concat(suffix)] || props["m".concat(suffix)]) && normalizeSpacingValue(val, true); }, function (props) { return (props["mb".concat(suffix)] || props["my".concat(suffix)] || props["m".concat(suffix)]) && normalizeSpacingValue(val, true); }); }; // Padding var spacingPadding = function spacingPadding(size, value) { var suffix = "".concat(size).concat(value); return (0, _styledComponents.css)(_templateObject36(), function (props) { return (props["pl".concat(suffix)] || props["px".concat(suffix)] || props["p".concat(suffix)]) && normalizeSpacingValue(value); }, function (props) { return (props["pr".concat(suffix)] || props["px".concat(suffix)] || props["p".concat(suffix)]) && normalizeSpacingValue(value); }, function (props) { return (props["pt".concat(suffix)] || props["py".concat(suffix)] || props["p".concat(suffix)]) && normalizeSpacingValue(value); }, function (props) { return (props["pb".concat(suffix)] || props["py".concat(suffix)] || props["p".concat(suffix)]) && normalizeSpacingValue(value); }); }; /* Flex ------------------------------------------------------------------- */ var flexDirection = function flexDirection(size) { return (0, _styledComponents.css)(_templateObject37(), function (props) { return (props["flex".concat(size, "Row")] ? 'row' : '') || (props["flex".concat(size, "RowReverse")] ? 'row-reverse' : '') || (props["flex".concat(size, "Column")] ? 'column' : '') || (props["flex".concat(size, "ColumnReverse")] ? 'column-reverse' : '') || null; }); }; var justifyContent = function justifyContent(size) { return (0, _styledComponents.css)(_templateObject38(), function (props) { return (props["justifyContent".concat(size, "Start")] ? 'start' : '') || (props["justifyContent".concat(size, "End")] ? 'end' : '') || (props["justifyContent".concat(size, "Center")] ? 'center' : '') || (props["justifyContent".concat(size, "SpaceBetween")] ? 'space-between' : '') || (props["justifyContent".concat(size, "SpaceAround")] ? 'space-around' : '') || (props["justifyContent".concat(size, "SpaceEvenly")] ? 'space-evenly' : '') || null; }); }; var alignItems = function alignItems(size) { return (0, _styledComponents.css)(_templateObject39(), function (props) { return (props["alignItems".concat(size, "Start")] ? 'start' : '') || (props["alignItems".concat(size, "End")] ? 'end' : '') || (props["alignItems".concat(size, "Center")] ? 'center' : '') || (props["alignItems".concat(size, "Baseline")] ? 'baseline' : '') || (props["alignItems".concat(size, "Stretch")] ? 'stretch' : '') || null; }); }; var alignSelf = function alignSelf(size) { return (0, _styledComponents.css)(_templateObject40(), function (props) { return (props["alignSelf".concat(size, "Start")] ? 'start' : '') || (props["alignSelf".concat(size, "End")] ? 'end' : '') || (props["alignSelf".concat(size, "Center")] ? 'center' : '') || (props["alignSelf".concat(size, "Baseline")] ? 'baseline' : '') || (props["alignSelf".concat(size, "Stretch")] ? 'stretch' : '') || null; }); }; var alignContent = function alignContent(size) { return (0, _styledComponents.css)(_templateObject41(), function (props) { return (props["alignContent".concat(size, "Start")] ? 'start' : '') || (props["alignContent".concat(size, "End")] ? 'end' : '') || (props["alignContent".concat(size, "Center")] ? 'center' : '') || (props["alignContent".concat(size, "Baseline")] ? 'baseline' : '') || (props["alignContent".concat(size, "Stretch")] ? 'stretch' : '') || null; }); }; var flexOrder = function flexOrder(size) { return (0, _styledComponents.css)(_templateObject42(), function (props) { return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(function (order) { return props["order".concat(size).concat(order)] && (0, _styledComponents.css)(_templateObject43(), order); }); }); }; var flexGrow = function flexGrow(size) { return (0, _styledComponents.css)(_templateObject44(), function (props) { if (props["flexGrow".concat(size)] !== undefined) { return '1'; } if (props["flexGrow".concat(size, "0")] !== undefined) { return '0'; } return null; }); }; var flexShrink = function flexShrink(size) { return (0, _styledComponents.css)(_templateObject45(), function (props) { if (props["flexShrink".concat(size)] !== undefined) { return '1'; } if (props["flexShrink".concat(size, "0")] !== undefined) { return '0'; } return null; }); }; var flexWrap = function flexWrap(size) { return (0, _styledComponents.css)(_templateObject46(), function (props) { if (props["flexWrap".concat(size)] !== undefined) { return 'wrap'; } if (props["flexWrap".concat(size, "Reverse")] !== undefined) { return 'wrap-reverse'; } if (props["flexNoWrap".concat(size)] !== undefined) { return 'nowrap'; } return null; }); }; /* Visibility ------------------------------------------------------------- */ var visibility = function visibility(size) { return (0, _styledComponents.css)(_templateObject47(), function (props) { if (props["visible".concat(size)] !== undefined) { return 'visible'; } if (props["invisible".concat(size)] !== undefined) { return 'hidden'; } return null; }); }; /* Resize ----------------------------------------------------------------- */ var resize = function resize(size) { return (0, _styledComponents.css)(_templateObject48(), function (props) { if (props["resize".concat(size, "None")] !== undefined) { return 'none'; } if (props["resize".concat(size, "Both")] !== undefined) { return 'both'; } if (props["resize".concat(size, "Vertical")] !== undefined) { return 'vertical'; } if (props["resize".concat(size, "Horizontal")] !== undefined) { return 'horizontal'; } return null; }); }; /* Display ---------------------------------------------------------------- */ var display = function display(size) { return (0, _styledComponents.css)(_templateObject49(), function (props) { return (props["d".concat(size, "None")] ? 'none' : '') || (props["d".concat(size, "Inline")] ? 'inline' : '') || (props["d".concat(size, "InlineBlock")] ? 'inline-block' : '') || (props["d".concat(size, "Block")] ? 'block' : '') || (props["d".concat(size, "Table")] ? 'table' : '') || (props["d".concat(size, "TableCell")] ? 'table-cell' : '') || (props["d".concat(size, "TableRow")] ? 'table-row' : '') || (props["d".concat(size, "Flex")] ? 'flex' : '') || (props["d".concat(size, "InlineFlex")] ? 'inline-flex' : '') || null; }); }; /* Clearfix --------------------------------------------------------------- */ var clearfix = function clearfix(size) { return (0, _styledComponents.css)(_templateObject50(), function (props) { return props["clearfix".concat(size)] && (0, _styledComponents.css)(_templateObject51()); }); }; /* Aggregation ------------------------------------------------------------ */ var makeUtilitiesForScreenSize = function makeUtilitiesForScreenSize(size) { return (0, _styledComponents.css)(_templateObject52(), display(size), sizing(size), float(size), spacingMargin(size, 'Auto'), function () { return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(function (s) { return (0, _styledComponents.css)(_templateObject53(), spacingMargin(size, s), spacingMargin(size, s, true), spacingPadding(size, s)); }); }, textTransform(size), textAlign(size), textWrap(size), textWeight(size), textStyle(size), textMonospace(size), textReset(size), textDecoration(size), textWordBreak(size), textTruncate(size), verticalAlign(size), flexDirection(size), justifyContent(size), alignContent(size), alignItems(size), alignSelf(size), flexGrow(size), flexShrink(size), flexWrap(size), flexOrder(size), visibility(size), border(size, ''), border(size, '0'), borderColor(size), rounded(size), roundedCircle(size), roundedPill(size), textColors(size), backgroundColors(size), resize(size), clearfix(size), textHide(size), overflow(size), position(size), shadow(size)); }; var Utilities = (0, _styledComponents.css)(_templateObject54(), makeUtilitiesForScreenSize(''), ['Sm', 'Md', 'Lg', 'Xl'].map(function (size) { return (0, _styledComponents.css)(_templateObject55(), function (props) { return (0, _styledConfig.getConcreteBreakpointSize)(props, size.toLowerCase()); }, makeUtilitiesForScreenSize(size)); }), hidden()); exports.Utilities = Utilities;