@vimeo/iris
Version:
Vimeo Design System
70 lines (63 loc) • 6.71 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var tslib_es6 = require('../../tslib.es6-3ec409b7.js');
var styled = require('styled-components');
var polished = require('polished');
var components_CardNewItem_CardNewItem_tokens = require('./CardNewItem.tokens.js');
var tokens_core = require('../../tokens/core.js');
var icons_ui_CirclePlus = require('../../icons/ui/CirclePlus.js');
var color_colors = require('../../color/colors.js');
var typography_Text_Text = require('../../typography/Text/Text.js');
require('../../tokens/util/readToken.js');
require('../../tokens/color/index.js');
require('../../tokens/color/background/background.js');
require('../../tokens/util/clamp.js');
require('../../tokens/color/format/format.js');
require('../../tokens/color/format/primary.js');
require('../../tokens/color/format/secondary.js');
require('../../tokens/color/format/tertiary.js');
require('../../tokens/color/rainbow/rainbow.js');
require('../../tokens/color/rainbow/conic/index.js');
require('../../tokens/color/rainbow/conic/sm.js');
require('../../tokens/color/rainbow/conic/xl.js');
require('../../tokens/color/rainbow/linear/index.js');
require('../../tokens/color/rainbow/linear/sm.js');
require('../../tokens/color/rainbow/linear/xl.js');
require('../../tokens/color/livestream/livestream.js');
require('../../tokens/color/status/status.js');
require('../../tokens/color/status/caution.js');
require('../../tokens/color/status/negative.js');
require('../../tokens/color/status/positive.js');
require('../../tokens/color/stroke/stroke.js');
require('../../tokens/color/surface/surface.js');
require('../../tokens/color/text/text.js');
require('../../tokens/util/round.js');
require('../../tokens/color/upsell/upsell.js');
require('../../tokens/color/upsell/sm.js');
require('../../tokens/color/upsell/xl.js');
require('../../tokens/color/upsell/new.js');
require('../../tokens/edge/edge.js');
require('../../tokens/space/space.js');
require('../../tokens/typography/index.js');
require('../../tokens/typography/size/size.js');
require('react');
require('../../typography/Text/Text.style.js');
require('../../typography/typography.js');
require('../../typography/Text/EditableText.js');
require('../../utils/HOCs/withIris.js');
require('../../utils/hooks/useLayoutStyles.js');
require('../../utils/DOM/geometry.js');
require('../../utils/css.js');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
var Wrapper = styled__default["default"].div(templateObject_1 || (templateObject_1 = tslib_es6.__makeTemplateObject(["\n cursor: pointer;\n position: relative;\n min-height: 12rem;\n border-radius: ", ";\n ", ";\n transition: 150ms ease-in-out;\n\n svg {\n height: ", ";\n background: ", ";\n transition: 180ms ease-in-out;\n }\n\n p {\n margin-top: ", ";\n margin-bottom: 0;\n transition: 150ms ease-in-out;\n }\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n outline: none;\n ", ";\n transform: scale(1.0075);\n\n svg {\n transform: scale(1.025);\n background: ", ";\n }\n }\n"], ["\n cursor: pointer;\n position: relative;\n min-height: 12rem;\n border-radius: ", ";\n ", ";\n transition: 150ms ease-in-out;\n\n svg {\n height: ", ";\n background: ", ";\n transition: 180ms ease-in-out;\n }\n\n p {\n margin-top: ", ";\n margin-bottom: 0;\n transition: 150ms ease-in-out;\n }\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n outline: none;\n ", ";\n transform: scale(1.0075);\n\n svg {\n transform: scale(1.025);\n background: ", ";\n }\n }\n"])), polished.rem(4), tokens_core.core.edge(0), polished.rem(30), components_CardNewItem_CardNewItem_tokens.tokens.icon, polished.rem(12), tokens_core.core.edge(200), components_CardNewItem_CardNewItem_tokens.tokens.iconHover);
var CirclePlus = styled__default["default"](icons_ui_CirclePlus.CirclePlus)(templateObject_2 || (templateObject_2 = tslib_es6.__makeTemplateObject(["\n margin-bottom: 0.5rem;\n border-radius: 50%;\n\n path:first-child {\n fill: none;\n }\n\n path:last-child {\n fill: ", ";\n }\n"], ["\n margin-bottom: 0.5rem;\n border-radius: 50%;\n\n path:first-child {\n fill: none;\n }\n\n path:last-child {\n fill: ", ";\n }\n"])), color_colors.white);
var Text = styled__default["default"](typography_Text_Text.Text)(templateObject_3 || (templateObject_3 = tslib_es6.__makeTemplateObject(["\n font-weight: 700;\n font-size: 1.25rem;\n line-height: 1.5rem;\n color: ", ";\n"], ["\n font-weight: 700;\n font-size: 1.25rem;\n line-height: 1.5rem;\n color: ", ";\n"])), tokens_core.core.color.text(0));
var Card = styled__default["default"].div(templateObject_4 || (templateObject_4 = tslib_es6.__makeTemplateObject(["\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n box-shadow: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n z-index: 2;\n background-color: ", ";\n transition: 150ms ease-in-out;\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"], ["\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n text-align: center;\n box-shadow: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n z-index: 2;\n background-color: ", ";\n transition: 150ms ease-in-out;\n\n &:hover,\n &:focus,\n &:focus-within,\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"])), components_CardNewItem_CardNewItem_tokens.tokens.background, components_CardNewItem_CardNewItem_tokens.tokens.backgroundHover);
var Content = styled__default["default"].div(templateObject_5 || (templateObject_5 = tslib_es6.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n"])));
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
exports.Card = Card;
exports.CirclePlus = CirclePlus;
exports.Content = Content;
exports.Text = Text;
exports.Wrapper = Wrapper;